User:Gryllida/standard.js

//prompt(location.href); //it works. //prompt; //fail /*url="" if(location.href.split('http://en.wikipedia.org/wiki/')[1]==undefined) { url="http://en.wikipedia.org/w/index.php?title="+location.href.split('title=')[1].split('&')[0]+"&action=edit&section=new"; } else { url="http://en.wikipedia.org/w/index.php?title="+location.href.split('http://en.wikipedia.org/wiki/')[1]+"&action=edit&section=new"; }*/

/* intended to work var newsectionlinkobj = document.createElement('a'); newsectionlinkobj.setAttribute('href', ""); var newsectionlinktxt = document.createTextNode("New section"); newsectionlinkobj.appendChild(newsectionlinktxt);

//prompt(document.getElementsByTagName('td')[1].getElementsByTagName('a')[2].innerHTML); //Error: document.getElementsByTagName('td')[1] is undefined //prompt(document.getElementsByClassName('top')[1].getElementsByTagName('a')[2].innerHTML); //Error: document.getElementsByClassName("top")[1] is undefined //if (document.title.indexOf("Editing User talk:") != -1) // http://en.wikipedia.org/w/index.php?title=User:VoA/monobook.js