油猴脚本网站 Greasy Fork镜像 页面美化及去广告

优化油猴脚本网站中文版(https://gf.qytechs.cn/zh-CN)代码显示区,采用暗色彩色风格和Consolas字体,阅读代码更加舒服。

  1. // ==UserScript==
  2. // @name 油猴脚本网站 Greasy Fork镜像 页面美化及去广告
  3. // @description 优化油猴脚本网站中文版(https://gf.qytechs.cn/zh-CN)代码显示区,采用暗色彩色风格和Consolas字体,阅读代码更加舒服。
  4. // @icon https://gf.qytechs.cn/assets/blacklogo96-1221dbbb8f0d47a728f968c35c2e2e03c64276a585b8dceb7a79a17a3f350e8a.png
  5. // @namespace https://gf.qytechs.cn/zh-CN/users/393603-tsing
  6. // @version 1.1
  7. // @author Tsing
  8. // @run-at document-start
  9. // @match https://gf.qytechs.cn/zh-CN/scripts*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. var style_tag = document.createElement('style');
  17. style_tag.innerHTML = '.width-constraint{max-width:1260px !important;} pre.prettyprint.lang-js.prettyprinted{font-family: "Consolas"; background-color: #1a1a1a; color: #ffffff; font-size: 1.2em;} .com{color: #666 !important;} .pln{color: #fff !important;} .kwd{color: #2ff !important;} .clo, .opn, .pun{color: #ccc !important;} .str{color: #ff6 !important;} .lit{color: #4ff !important;} .typ{color: #f4f !important;} ';
  18. document.head.appendChild(style_tag);
  19.  
  20. document.addEventListener ("DOMContentLoaded", remove_ad); // 等DOM加载完毕时执行
  21. function remove_ad(){
  22. document.getElementById("codefund").remove();
  23. document.getElementById("script-show-info-ad").remove();
  24. }
  25.  
  26. })();

QingJ © 2025

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