Wikipedia:WikiProject User scripts/Scripts/Unwatch: Difference between revisions
Content deleted Content added
allow user to choose either type of URL |
m kluge to handle case where "diff" is unlinked (eww) |
||
Line 15:
unwatch.appendChild(document.createTextNode("unwatch"));
links[i].parentNode.insertBefore(unwatch, links[i].nextSibling);
// kluge to handle case where "diff" is unlinked:
links[i].parentNode.insertBefore(links[i].previousSibling.cloneNode(true), unwatch);▼
var delim = links[i].previousSibling;
delim = (delim.nodeType == 3 ? delim.nodeValue : "");
▲ links[i].parentNode.insertBefore(
}
});
|