insert_css

insert css

  1. // ==UserScript==
  2. // @name insert_css
  3. // @include *
  4. // @supportURL https://github.com/sxlgkxk/browser_script/issues
  5. // @version 0.1
  6. // @description insert css
  7. // @namespace http://sxlgkxk.github.io/
  8. // @author sxlgkxk
  9. // @icon http://sxlgkxk.github.io/im/avatar.jpg
  10. // @license MIT
  11. // @grant GM_getValue
  12. // @grant GM_setValue
  13. // @grant GM_xmlhttpRequest
  14. // ==/UserScript==
  15.  
  16. /*
  17. div.container.full{color: #ccc; background:#232323}div.chapterContent{line-height:200% !important; width: 40% !important; font-size: 22px !important}
  18. a:visited{color: #fabd2f !important;}
  19. */
  20.  
  21. (function(){
  22.  
  23. body=document.querySelector('body')
  24. css_dom=document.createElement('div')
  25. body.after(css_dom)
  26.  
  27. custom_css=localStorage.getItem('custom_css')
  28. if(!custom_css) custom_css=""
  29.  
  30. css_dom.innerHTML=`<style>
  31. button#changeCssBtn{
  32.  
  33. }`
  34. +custom_css+
  35. `</style>
  36. <button onclick="document.changeCSS()" id="changeCssBtn">change css</button>`
  37.  
  38. document.changeCSS=()=>{
  39. _custom_css=localStorage.getItem('custom_css')
  40. if(!_custom_css) _custom_css=""
  41. custom_css=prompt("css?", _custom_css)
  42. if(custom_css)
  43. localStorage.setItem("custom_css", custom_css)
  44. }
  45.  
  46. })();

QingJ © 2025

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