User:Cuckooman4/statustab.js: Difference between revisions

Content deleted Content added
Cuckooman4 (talk | contribs)
Added autosave feature
m Maintenance: Replacing addPortletLink() with mw.util.addPortletLink() (mw:ResourceLoader/Migration_guide_(users)#addPortletLink)
 
(3 intermediate revisions by one other user not shown)
Line 4:
//<pre><nowiki>
 
if(!statuspageurl) var statuspageurl = "Status"
if(!statustemplateurl) var statustemplateurl = "StatusTemplate"
if(!statussyntax) var statussyntax = "{{User:" + wgUserName + "/" + statustemplateurl + "|%STATUSPARAMS%}}"
var autosave = false;
 
addOnloadHook(
function() {
mw.util.addPortletLink('p-cactions', 'http://en.wikipedia.org/w/index.php?title=Special:Mypage/'+statuspageurl+'&action=edit', 'edit status', 'ca-status')
 
if(___location.href=='http://en.wikipedia.org/w/index.php?title=User:'+wgUserName+'/'+statuspageurl+'&action=edit') {
Line 18 ⟶ 17:
document.getElementById("wpSummary").value = "Changing status: " + statusprompt
document.getElementById("wpMinoredit").checked = false
if((statusprompt != null) && (autosave == true)) {
document.editform.wpSave.click()
}
}
}