overlay2078

Turn the hole screen black till hovermouse

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/491238/1352698/overlay2078.js

  1. document.addEventListener('DOMContentLoaded', function () {
  2. const overlay = document.createElement('div');
  3. overlay.classList.add('overlay');
  4. document.body.appendChild(overlay);
  5.  
  6. overlay.style.position = 'absolute';
  7. overlay.style.top = '-10vh';
  8. overlay.style.left = '-10vw';
  9. overlay.style.width = '120vw';
  10. overlay.style.height = '420vh';
  11. overlay.style.backgroundColor = 'black';
  12. overlay.style.zIndex = '400';
  13.  
  14. document.body.addEventListener('mouseover', function () {
  15. if (overlay) {
  16. overlay.style.display = 'none';
  17. }
  18. });
  19. document.addEventListener('touchstart', function () {
  20. if (overlay) {
  21. overlay.style.display = 'none';
  22. }
  23. });
  24. document.addEventListener('mouseleave', function () {
  25. if (overlay) {
  26. overlay.style.display = 'none';
  27. }
  28. });
  29. });

QingJ © 2025

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