Last active
August 29, 2015 14:05
-
-
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…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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