Greasy Fork 支持简体中文。

resonsive

2021/11/18 下午3:32:59

  1. // ==UserScript==
  2. // @name resonsive
  3. // @namespace Violentmonkey Scripts
  4. // @include http://localhost*
  5. // @include http://127.0.0.1*
  6. // @include http://192.168.110.*
  7. // @grant GM_addStyle
  8. // @version 0.4.6
  9. // @author -
  10. // @license MIT
  11. // @description 2021/11/18 下午3:32:59
  12. // ==/UserScript==
  13.  
  14. document.addEventListener('keyup',(event)=>{
  15. if(event.keyCode === 188 && event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA'){
  16. const windowFeatures = "left=100,top=100,innerWidth=390,height=800";
  17. const handle = window.open(
  18. location.href,
  19. "_blank",
  20. windowFeatures,
  21. );
  22. }
  23. })
  24.  
  25. if(window.outerWidth<500){
  26. GM_addStyle(`
  27. ::-webkit-scrollbar {
  28. display: none; /* Chrome Safari */
  29. }
  30. `)
  31. }