我在飞机上,他们强迫每个页面(包括这个 Stack Overflow 页面)在顶部有一个横幅,上面有他们的广告。
这是我在 Firefox 中的 UserScript 的代码,但它不起作用:
// ==UserScript==
// @name SW Ad remover
// @namespace seangates.com/sw_ad_remover
// @include *
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js
// ==/UserScript==
$(document).ready(function(){
$('script[src$="swa.py"]').remove();
$('div[id^="__swa"]').hide();
$('body').css('padding',0);
console.log('working');
});
关于为什么这不起作用的任何想法?即使我将它放在 ready() 块的开头,我什至无法让 console.log 工作。