insert_css

insert css

目前為 2022-03-13 提交的版本,檢視 最新版本

// ==UserScript==
// @name         insert_css
// @include      *
// @supportURL   https://github.com/sxlgkxk/browser_script/issues
// @version      0.1
// @description  insert css
// @namespace    http://sxlgkxk.github.io/
// @author       sxlgkxk
// @icon         http://sxlgkxk.github.io/im/avatar.jpg
// @license      MIT
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_xmlhttpRequest
// ==/UserScript==

/*
div.container.full{color: #ccc; background:#232323}div.chapterContent{line-height:200% !important; width: 40% !important; font-size: 22px !important}
a:visited{color: #fabd2f !important;}
*/

(function(){

body=document.querySelector('body')
css_dom=document.createElement('div')
body.after(css_dom)

custom_css=localStorage.getItem('custom_css')
if(!custom_css) custom_css=""

css_dom.innerHTML=`<style>
	button#changeCssBtn{

	}`
	+custom_css+
`</style>
<button onclick="document.changeCSS()" id="changeCssBtn">change css</button>`

document.changeCSS=()=>{
	_custom_css=localStorage.getItem('custom_css')
	if(!_custom_css) _custom_css=""
	custom_css=prompt("css?", _custom_css)
	if(custom_css)
		localStorage.setItem("custom_css", custom_css)
}

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址