Jump to content

Alternative to AdSweep that works great!


Icedrake

Recommended Posts

Since AdSweep has been discontinued, and it won't be updated anymore, I found another adblocking extension (userscript version too) for Chrome/Chromium/Iron. It's Adblock+ for Chrome, and it works amazingly well, and I'm using it right now.

 

Here's the link: http://userscripts.org/scripts/show/46974

 

There's a userscript version, and an extension version. It's updated regularly by it's creator. It even has a feature for blocking ads and embeds that it doesn't catch. All you have to do is press the keys Alt+B, and wallah, you can now block anything on the page that you want. It's a great feature!

Link to comment
Share on other sites

  • Moderators

I think that would be better with it being based off of Adblock Plus, and since you can add your own stuff to block that it misses.

 

I don't use Chrome anymore however I've added that site to my bookmarks just in case.

Link to comment
Share on other sites

Update: Due to lack of time, lack of technical support, and despite repeated requests with no feedback, I sadly had to discontinue the AdSweep project. You can still download it and tweak the source code to your needs if you know how to do so. I will no longer remove ads on demand. Thanks to those who have helped me.

 

From: www.adsweep.org

Link to comment
Share on other sites

  • Moderators

Unless I'm missing something this script doesn't have any blocked sites in it.

I get the manual thing, but why call it adblock plus if it doesn't use the filters?

 

 

// ==UserScript==// @name AdBlock+// @author Lex1// @version 1.0.8// @run-at document-start// @include *// @description AdBlock+ for Chrome. Press Alt+B for blocking ads. Press Alt+E for editing styles.// @namespace http://lexi.ucoz.ru/index/0-4// ==/UserScript==(function(){var getValue = function(name){	var nameEQ = name + '=';	var ca = document.cookie.split(';');	for(var i = 0, c; c = ca[i]; i++){		while(c.charAt(0) == ' ')c = c.substring(1, c.length);		if(c.indexOf(nameEQ) == 0)return unescape(c.substring(nameEQ.length, c.length));	};	return '';};var setValue = function(name, value, days){	var date = new Date();	date.setTime(date.getTime()+((days || 10*365)*24*60*60*1000));	if(document.cookie.split(';').length < 20 && document.cookie.length-escape(getValue(name)).length+escape(value).length < 4000){		document.cookie = name+'='+escape(value)+'; expires='+date.toGMTString()+'; path=/';	}	else{		alert('Cookies is full!');	}};var addStyle = function(css){	var s = document.createElement('style');	s.setAttribute('type', 'text/css');	s.setAttribute('style', 'display: none !important;');	s.appendChild(document.createTextNode(css));	return (document.getElementsByTagName('head')[0] || document.documentElement).appendChild(s);};// Set style at loading pagevar style; if(document.documentElement instanceof HTMLHtmlElement && (style = getValue('ujs_adblock'))){	setTimeout(function(){addStyle(style + '{ display: none !important }')}, 1);};// Hotkeysdocument.addEventListener('keydown', function(e){	// Edit styles with Alt+E	if(e.keyCode == 69 && !e.shiftKey && !e.ctrlKey && e.altKey){		var rez = prompt('Please, edit styles:', getValue('ujs_adblock'));		if(rez != null){setValue('ujs_adblock', rez); location.reload(false)};	};	// Block elements with Alt+B	if(e.keyCode == 66 && !e.shiftKey && !e.ctrlKey && e.altKey){		if(window.navigator.ujs_AdBlock)return; else window.navigator.ujs_AdBlock = true;		var ele = '', outline = '', border = '', bgColor = '', title = '', altPressed = false, reObjects = /^(iframe|object|embed)$/i;		var clearCss = function(css){			var a = css.split(',');			for(var i = a.length - 1; i >= 0; i--){				var rule = a[i] + '>';				for(var j = a.length - 1; j >= 0; j--){					if(a[j].indexOf(rule) == 0)a.splice(j, 1);				}			};			return a.join(',');		};		var getAtt = function(el, tags){			var rez = '';			if(el.attributes){				var r = new RegExp('^('+tags+')$');				for(var i = 0, a; a = el.attributes[i]; i++){					var n = a.nodeName.toLowerCase();					if(r.test(n))rez += '['+n+'=\x22'+a.nodeValue+'\x22]';				};			};			return rez;		};		var getNth = function(el){			if(altPressed || /^(html|body|iframe|embed|img|a)$/i.test(el.nodeName))return '';			var nth, n = 0;			var p = el.parentNode;			for(var i = 0, c; c = p.childNodes[i]; i++){if(c.nodeType == 1){n++; if(c == el)nth = n}};			return (!nth || n < 2) ? '' : ':nth-child('+nth+')';		};		var block = function(el){			var css = getAtt(el, 'src|href|id');			if(css){				css = el.nodeName+css;			}			else{				var rez = [];				while(el){if(el.nodeType == 1)rez.unshift(el.nodeName+getAtt(el, 'src|href|id|class|height|width|color')+getNth(el)); el = el.parentNode};				css = rez.join('>');			};			var tmpCss = addStyle(css+'{background-color: #FF5555 !important; outline: 1px solid #FF1111 !important; opacity: 0.7 !important;}');			css = prompt('Block this element(s)?', css);			if(css){				addStyle(css + '{display: none !important;}');				var oldCss = getValue('ujs_adblock');				setValue('ujs_adblock',  (oldCss ? clearCss(oldCss+ ',' + css) : css));			};			tmpCss.parentNode.removeChild(tmpCss);		};		var remove = function(){			document.removeEventListener('mouseover', over, false);			document.removeEventListener('mouseout', out, false);			document.removeEventListener('click', click, false);			document.removeEventListener('keyup', press, false);			delete window.navigator.ujs_AdBlock;		};		var over = function(ev){			ele = ev.target;			title = ele.title;			ele.title = 'Tag: '+ele.tagName+(ele.id ? ', ID: '+ele.id : '')+(ele.className ? ', Class: '+ele.className : '');			if(reObjects.test(ele.nodeName)){				border = ele.style.border;				ele.style.border = '2px solid #306EFF';			}			else{				outline = ele.style.outline;				ele.style.outline = '1px solid #306EFF';				bgColor = ele.style.backgroundColor;				ele.style.backgroundColor = '#C6DEFF';			}		};		var out = function(){			if(ele){				ele.title = title;				if(reObjects.test(ele.nodeName)){					ele.style.border = border;				}				else{					ele.style.outline = outline;					ele.style.backgroundColor = bgColor;				}			}		};		var click = function(ev){			if(ele){				altPressed = ev.altKey;				ev.preventDefault();				out();				remove();				block(ele);			}		};		var press = function(ev){			if(ev.keyCode == 27){				out();				remove();			}		};		document.addEventListener('mouseover', over, false);		document.addEventListener('mouseout', out, false);		document.addEventListener('click', click, false);		document.addEventListener('keyup', press, false);	}}, false);})();

 

Link to comment
Share on other sites

  • Moderators
Unless I'm missing something this script doesn't have any blocked sites in it.

I get the manual thing, but why call it adblock plus if it doesn't use the filters?

Are you sure it isn't loading another file with it. I just looked through my exported AdBlock Plus custom filters and it looks nothing like the script you posted.

Link to comment
Share on other sites

  • Moderators

That is the script thats in Icedrakes link. If you click install thats what you get.

I installed it like you do adsweep and the cntrl+b thing works, but there is no filters in the script initially...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.