Taboola Ads Remover

A script which removes the annoying Taboola ads.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        Taboola Ads Remover
// @namespace   MegaByteTAR
// @description A script which removes the annoying Taboola ads.
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @run-at      document-idle
// @include     *
// @version     1
// @grant       none
// ==/UserScript==


    this.$ = this.jQuery = jQuery.noConflict(true);
	
	var attr = ["class", "id"];
    var filter = ["Taboola_TOP_LEADERBOARD_AB", "taboola-above-article-thumbnails", "NATIVE_TABOOLA_ARTICLE", "Taboola_NATIVE_TABOOLA_ARTICLE", "taboola-below-article-thumbnails"];
    var link_wrapper = ["trc_rbox_container", "trc_wrapper", "trc_header", "videoCube", ]
	var link_filter = ["taboola.com", "taboolasyndication.com"];
    
    function check() {
	
		for(var a of attr) {
			for(var f of filter) $("["+a+"*="+f+"]").remove();
			for(var f of link_wrapper) for(var lf of link_wrapper) {
					var w = $("["+a+"*="+f+"]");
					if(w.find("[href*="+lf).length!=0) w.remove();
				}
		}
		
		setTimeout(check, 100);
	}
	
	check();