Chiphell 灰度模式

将 www.chiphell.com 的所有页面呈现为灰色调

  1. // ==UserScript==
  2. // @name Chiphell 灰度模式
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description 将 www.chiphell.com 的所有页面呈现为灰色调
  6. // @author wosell
  7. // @match *://www.chiphell.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // 创建样式元素
  15. const style = document.createElement('style');
  16. style.type = 'text/css';
  17.  
  18. // 添加灰度效果样式
  19. style.innerHTML = `
  20. html {
  21. filter: grayscale(100%);
  22. -webkit-filter: grayscale(100%);
  23. -moz-filter: grayscale(100%);
  24. -ms-filter: grayscale(100%);
  25. -o-filter: grayscale(100%);
  26. filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='grayscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0'/></filter></svg>#grayscale");
  27. filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
  28. }
  29. `;
  30.  
  31. // 将样式添加到文档头部
  32. document.head.appendChild(style);
  33. })();

QingJ © 2025

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