Acrobatic_Taro_1984 | 1 points | May 14 2022 09:16:57
有没有会写油猴的,我想屏蔽掉PC端右下角的的gif(看的头花),但切换url时下面代码不管用// ==UserScript==
// u/nameNew Userscript
// u/namespacehttp://tampermonkey.net/
// u/version0.1
// u/description try to take over the world!
// u/authorYou
// u/matchhttps://www.reddit.com/*
// u/iconhttps://www.google.com/s2/favicons?sz=64&domain=reddit.com
// u/grantnone
// ==/UserScript==
(function() {
'use strict';
// Your code here...
var img = document.querySelector('._3WqRAmto46uhALFWnn8-Pa')
img.style.display = 'none'
var _wr = function (type) {
var orig = history[type];
return function () {
var rv = orig.apply(this, arguments);
var e = new Event(type);
e.arguments = arguments;
window.dispatchEvent(e);
return rv;
};
};
history.pushState = _wr('pushState');
window.addEventListener('pushState', function (e) {
var img = document.querySelector('._3WqRAmto46uhALFWnn8-Pa')
img.style.display = 'none'
});
})();
[-] suicl | 1 points | May 14 2022 09:21:02
Adcock选中模块屏蔽就行了