User:Writ Keeper/Scripts/teahouseTalkbackLink.js: Difference between revisions

Content deleted Content added
m friggin underscores
m bugfix1
Line 16:
{
var link = nodeList[i];
if((link.href.substring(28,39) == "/User_talk:" && link.href.lastIndexOf("/") == 28))
{
var newLink = document.createElement("form");
newLink.style.display = "inline-block";
newLink.method = "post";
newLink.action = link.href + "?action=submit&section=new&preloadTitle=Teahouse%20Talkback";
newLink.id = "TBSubmit" + i;
newLink.innerHTML = '|<a href="#" onclick="talkbackSubmit(' + i + '); return;" style="font-size:x-small;" title="Send a talkback!">TB</a>|';
addAfter(newLink, link);
i++;
}
else if(link.href.substring(42,52) == "User_talk:" && link.href.lastIndexOf("/") == 41)
{
var newLink = document.createElement("form");
newLink.style.display = "inline-block";
newLink.method = "post";
newLink.action = link.href.substring(0, link.href.search("&"))+ "&action=submit&section=new";
newLink.id = "TBSubmit" + i;
newLink.innerHTML = '|<a href="#" onclick="talkbackSubmit(' + i + '); return;" style="font-size:x-small;" title="Send a talkback!">TB</a>|';