Greasy Fork

Greasy Fork is available in English.

Very rough wp.pl anti adblock killer

The script attemps to remove the "Tworzenie treści to nasza pasja" popups on wp.pl websites

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name     Very rough wp.pl anti adblock killer
// @author   JGondek
// @version  0.1
// @description The script attemps to remove the "Tworzenie treści to nasza pasja" popups on wp.pl websites
// @include  *.wp.pl/*
// @include  https://wp.pl
// @include  https://www.wp.pl
// @require  http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @grant    GM_addStyle
// @namespace http://greasyfork.icu/users/736392
// ==/UserScript==
/*- The @grant directive is needed to work around a design change
    introduced in GM 1.0.   It restores the sandbox.
*/

let functionCalled = 0;
console.log("MY wp.pl anti adblock killer: started observing...");


let inter = setInterval(function() {

    if(functionCalled === 10) {
        clearInterval(inter);
        console.log("MY wp.pl anti adblock killer: stopped observing");
        return;
    }

    console.log("MY wp.pl anti adblock killer: checking for element...");

    let element = $('body > div')
    .filter(function() {
        return this.id.match(/.{10}/);
    });

    if(element.length !== 0 && element.length < 3) {
        console.log("MY wp.pl anti adblock killer: element found, removing...");
        element.remove();
    }

    functionCalled++;

}, 500);