Wikipedia:WikiProject User scripts/Scripts/test-enhanced: Difference between revisions

Content deleted Content added
Where (talk | contribs)
test-enhanced
 
cleanup
 
(8 intermediate revisions by 7 users not shown)
Line 1:
function tnaddlilink(url, name)
{
var na = document.createElement('a');
na.setAttribute('href', url);
Line 10:
li.appendChild(na);
return li;
}
 
function testn(number)
{
var page = prompt("Vandalism to which article?")
var f = document.editform, t = f.wpTextbox1;
Line 21:
f.wpSummary.value = "Vandalism to [[" + page + "]] - warning " + number;
f.submit();
}
 
function wA() {
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
Line 30:
f.wpSummary.value = "Welcome to Wikipedia!";
f.submit();
}
 
function wap() {
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
Line 39:
f.wpSummary.value = "Use preview; also, welcome!";
f.submit();
}
 
 
function es() {
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
t.value += "==Edit summairessummaries==\n{{subst:" + "Edit summary" + "}} ~" + "~" + "~" + "~";
f.wpSummary.value = "Please use edit summaries";
f.submit();
}
 
function add_testn_tabs()
{
var c1 = document.getElementById('column-one');
var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
Line 72:
tabs.appendChild(tnaddlilink('javascript:wA()',"w-A"));
tabs.appendChild(tnaddlilink('javascript:wap()',"w-A-p"));
}}
addOnloadHook(add_testn_tabs);