Talk To The Hand is a Greasemonkey userscript that allows Firefox users to hide entries with selected tags from your Livejournal friends page view. This edition is only known to work with the A Sturdy Gesture page layout. Ports to some other layouts should be trivial (I plan to do a Generator one this afternoon), but I haven't manged to figure out
(
Read more... )
function killTag()
{
tag = this.getAttribute("tag");
tagname = this.getAttribute("tagname");
if (confirm('Do you want to hide all entries by this user tagged "' + tagname +'"?'))
{
GM_setValue(tag, 1);
location.reload();
}
}
function changeColor()
{
this.style.color = "red";
}
function changeAgain()
{
this.style.color = "#eae";
}
function changeBack()
{
this.style.color = "blue";
}
function popup()
{
var deletedtags = document.createElement("div");
deletedtags.style.color = "black";
report.removeEventListener("click", popup, true);
report.removeEventListener("mouseover", changeColor, true);
report.removeEventListener("mouseout", changeBack, true);
deletedtags.style.backgroundColor = "yellow";
deletedtags.style.position = "absolute";
deletedtags.style.border = "yellow outset .3em";
deletedtags.style.padding = ".3em";
var header = document.createTextNode("Select the tags for entries you want to restore.");
deletedtags.appendChild(header);
var contents = document.createElement("form");
deletedtags.appendChild(contents)
contents.setAttribute("name", "tagslist");
contents.setAttribute("id", "tagslist");
for (i=0; i < kills; i++)
{
var box = document.createElement("input");
box.setAttribute("type", "checkbox");
box.setAttribute("name", blist[i]);
contents.appendChild(box);
var caption = document.createElement("span");
var username = blist[i].match(/[\w\-]+(?=\.)/);
GM_log(username);
caption.appendChild(document.createTextNode(btags[i]+ " by " + username));
contents.appendChild(caption);
contents.appendChild(document.createElement("br"));
}
var undelete = document.createElement("input");
undelete.setAttribute("type", "button");
undelete.setAttribute("value", "undelete");
undelete.setAttribute("name", "undelete");
contents.appendChild(undelete);
undelete.addEventListener("click", process, false);
report.appendChild(deletedtags);
}
function process()
{
var tagslist = document.forms.namedItem("tagslist");
for (i = 0; i < kills; i++) {
var tagzz = tagslist.elements.namedItem(blist[i]);
if (tagzz.checked)
{
GM_log(blist[i]);
GM_setValue(blist[i], 0);
}
}
location.reload();
}
Reply
Leave a comment