$('img[src^="img"]').eq(0).css("max-height", "0");
I challenge you to remove the gray ad using Adblock
31–40 of 46 posts
Re: I challenge you to remove the gray ad using Adblock
#32 var found = false;
$('img').each(function(i, elem) {
var e = $(elem);
if( e.attr('src') !== '' && !found ) {
e.attr("style","opacity:0.0;");
found = true;
}
});Re: I challenge you to remove the gray ad using Adblock
#33Re: I challenge you to remove the gray ad using Adblock
#34 var removeGrayImage = function() {
$("img").each(function(idx, el) {
var canvas = $("")[0];
canvas.width = el.width;
canvas.height = el.height;
canvas.getContext("2d").drawImage(el, 0, 0, el.width, el.height);
var pixel = canvas.getContext("2d").getImageData(1, 1, 1, 1);
var r = pixel.data[0];
var g = pixel.data[1];
var b = pixel.data[2];
if(r == 183 && g == 183 && b == 183) {
$(el).css({opacity: 0});
}
});
};Re: I challenge you to remove the gray ad using Adblock
#35 style="height: 250px; width: 250px;"
After that, other than positionally blocking them, there's nothing that can be done short of visually inspecting the element.You could modify the script to randomly place the ad either first or second, so you don't need the third tag with no src.
What is the goal of this experiment?
Re: I challenge you to remove the gray ad using Adblock
#36It still has a style that the other image doesn't: style="height: 250px; width: 250px;" After that, other than positionally blocking them, there's nothing that can be done short of visually inspecting the element. You could modify the script to randomly place the ad either first or second, so you don't need the third tag with no src. What is the goal of this experiment?
I'm guessing intern at an ad network pitches he can come up with an "unblockable ad" to his boss.
Boss wants to go home for the holiday weekend so he says, "OK, whatever kid" as he's walking out the door just after lunch.
Intern signs up with a one-hour old HN account and posts his masterpiece here and starts playing whack-a-mole with the dozens of methods to trivially block the "unblockable ad".
After a couple hours, everyone gets bored and goes back to work. The intern frets and worries all weekend that he promised his boss an unblockable ad and won't be able to deliver on Tuesday when everyone is back in the office. Come Tuesday, he goes into the office, sweating and nervous to discover his boss wasn't in the slightest bit paying attention to whatever it was he was saying last Friday.
Re: I challenge you to remove the gray ad using Adblock
#37Re: I challenge you to remove the gray ad using Adblock
#38var removeGrayImage = function() { $("img").each(function(idx, el) { var canvas = $(" ")[0]; canvas.width = el.width; canvas.height = el.height; canvas.getContext("2d").drawImage(el, 0, 0, el.width, el.height); var pixel = canvas.getContext("2d").getImageData(1, 1, 1, 1); var r = pixel.data[0]; var g = pixel.data[1]; var b = pixel.data[2]; if(r == 183 && g == 183 && b == 183) { $(el).css({opacity: 0}); } }); };
Here's my equivalent solution:
var canvas = document.createElement('canvas');
canvas.height = 1;
canvas.width = 1;
var twodctx = canvas.getContext('2d');
var blockImg = null;
var qs = document.querySelectorAll('img');
for (var i = 0; i Re: I challenge you to remove the gray ad using Adblock
#39Re: I challenge you to remove the gray ad using Adblock
#40var removeGrayImage = function() { $("img").each(function(idx, el) { var canvas = $(" ")[0]; canvas.width = el.width; canvas.height = el.height; canvas.getContext("2d").drawImage(el, 0, 0, el.width, el.height); var pixel = canvas.getContext("2d").getImageData(1, 1, 1, 1); var r = pixel.data[0]; var g = pixel.data[1]; var b = pixel.data[2]; if(r == 183 && g == 183 && b == 183) { $(el).css({opacity: 0}); } }); };
var removeImageByHash = function() {
var bad = [525994816];
var canvas = document.createElement('canvas');
var ctx = canvas.getContext("2d");
var imgs = document.querySelectorAll('img');
for( var idx = 0; idx