Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save VenkataRaju/9b1c5bae2239737e28f1 to your computer and use it in GitHub Desktop.
Save VenkataRaju/9b1c5bae2239737e28f1 to your computer and use it in GitHub Desktop.
Bookmarklet to show only 'story' in this 'Eenadu telugu news paper Sunday story page' http://www.eenadu.net/Magzines/Sundayspecialinner.aspx?qry=katha
javascript:
/* Shows only story in this Eenadu telugu news paper Sunday story page
http://www.eenadu.net/Magzines/Sundayspecialinner.aspx?qry=katha */
var el = document.getElementById("sandayspecialdisplay");
removeEverythingExceptMyPath(el);
function removeEverythingExceptMyPath(el)
{
if(el.nodeName === "HTML")
return;
el.style.width = "100%";
var children = el.parentNode.children; /* 'let' is not working, not sure why */
for(var i = children.length - 1; i >= 0; i--)
{
var child = children[i];
if(child === el)
continue;
var style = child.style;
if(style)
style.display = "none";
}
removeEverythingExceptMyPath(el.parentNode);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment