网页黑白滤镜

将网页显示为黑白效果

安装此脚本?
作者推荐脚本

您可能也喜欢网页淡彩显示

安装此脚本
  1. // ==UserScript==
  2. // @name 网页黑白滤镜
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  5. // @description 将网页显示为黑白效果
  6. // @author ccav5
  7. // @match *://*/*
  8. // @exclude *://*.jd.com/*
  9. // @exclude *://*.jd.hk/*
  10. // @exclude *://*.taoao.com/*
  11. // @exclude *://*.tmall.com/*
  12. // @grant none
  13. // @license MIT
  14. // ==/UserScript==
  15.  
  16. (function() {
  17. addNewStyle("*{-webkit-filter: grayscale(100%)}")
  18. })();
  19.  
  20. function addNewStyle(newStyle) {
  21. console.log("👴 add new style:", newStyle)
  22. var styleElement = document.getElementById('styles_js');
  23.  
  24. if (!styleElement) {
  25. styleElement = document.createElement('style');
  26. styleElement.type = 'text/css';
  27. styleElement.id = 'styles_js';
  28. document.getElementsByTagName('head')[0].appendChild(styleElement);
  29. }
  30.  
  31. styleElement.appendChild(document.createTextNode(newStyle));
  32. }

QingJ © 2025

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