Skip to content

Instantly share code, notes, and snippets.

@rukshn
Last active August 29, 2015 14:05
Show Gist options
  • Save rukshn/333318d0f86e525bf696 to your computer and use it in GitHub Desktop.
Save rukshn/333318d0f86e525bf696 to your computer and use it in GitHub Desktop.
No one likes an Ad filled website, but what happens when that is one the most visited news websites, it sucks. This is a small browser bookmarklet that helps you to get rid of most of the ads at Daily Mirror, FT.lk, Lankadeepa and Mirror Sports. Bookmark this bookmarklet (I think you know how) and when you are reading news at any of those websit…
javascript:(function(){
if (!($ = window.jQuery)) {
var jq = document.createElement('script');
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js";
document.body.appendChild(script);
}
else {
releasetheKraken();
}
function releasetheKraken() {
var flasies = $('object');
$.each(flasies, function(index, value) {
$(value).remove();
});
var embed = $('embed');
$.each(embed, function(index, value) {
$(value).remove();
});
if(window.location.href.indexOf('lankadeepa') > -1) {
var iframes = $('iframe');
$.each(iframes, function(index, value) {
$(value).remove();
});
$("#container a:first").remove();
}
if(window.location.href.indexOf('sports') > -1) {
var iframes = $('iframe');
$.each(iframes, function(index, value) {
$(value).remove();
});
}
if(window.location.href.indexOf("daily") > -1){
var intersection = ["Mod275", "Mod1228", "Mod274"];
$.each(intersection, function(index, value) {
$("#" + value).remove();
});
$('body').attr("style" , "background : none !important");
if(window.location.href.indexOf("news") > -1) {
$("#ja-right").remove();
$(".module").remove();
}
}
if(window.location.href.indexOf("ft") > -1){
var wr = $('#wrap');
$('body').html('');
$('body').html(wr);
}
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment