mask fix screen

Fix screen gray display problem

当前为 2020-07-09 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name mask fix screen
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description Fix screen gray display problem
  6. // @author jackdizhu
  7. // @match *
  8. // @include *
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. let isTOP = window.top === window
  15. if (!isTop) {
  16. return false
  17. }
  18. let $div = document.createElement('div')
  19. $div.style = `
  20. position: fixed;
  21. pointer-events: none;
  22. width: 100%;
  23. height: 100%;
  24. left: 0;
  25. top: 0;
  26. background: #eee;
  27. opacity: 0.1;
  28. z-index: 999999999;
  29. `
  30. document.body.appendChild($div)
  31. })();