🏠 Home 

汉兜随心玩

随心玩汉兜


安装此脚本?
  1. // ==UserScript==
  2. // @name 汉兜随心玩
  3. // @version 1.0
  4. // @description 随心玩汉兜
  5. // @author pjy612
  6. // @namespace https://greasyfork.org/users/377794
  7. // @match https://handle.antfu.me/*
  8. // @match https://handle.mmxiaowu.com/*
  9. // @match https://handle.yuiffy.com/*
  10. // @grant unsafeWindow
  11. // @run-at document-start
  12. // ==/UserScript==
  13. (function() {
  14. 'use strict';
  15. const w = unsafeWindow || window;
  16. let uget,log;
  17. if(!uget){
  18. uget = URLSearchParams.prototype.get;
  19. }
  20. if(!log){
  21. log = w.console.log;
  22. }
  23. URLSearchParams.prototype.get = function(name){
  24. if(name=='dev'){return 'hey'};
  25. return uget.apply(this,arguments);
  26. };
  27. w.console.log = function(){
  28. let arg = arguments;
  29. if(arg){
  30. if(arg[0].startsWith('D')){
  31. w.answer = [...arg];
  32. return;
  33. }
  34. }
  35. return log.apply(this,arguments);
  36. };
  37. window.onload = function(){
  38. document.querySelectorAll('a.btn[href*=dev]')?.forEach(a=>{
  39. a.href = a.href.replace('dev=hey&','');
  40. });
  41. document.querySelector('[h-200]')?.removeAttribute('h-200');
  42. document.querySelector('[mb-2]')?.remove();
  43. };
  44. })();