Content deleted Content added
update for huggle link |
m Maintenance: Replacing addPortletLink() with mw.util.addPortletLink() (mw:ResourceLoader/Migration_guide_(users)#addPortletLink) |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 5:
function CustomizeLinkModifications() {
var un = mw.config.get('wgUserName')
var ONLINEpagetoedit = "http://en.wikipedia.org/w/index.php?title=User:Cj005257/status&action=edit&newstatus=online";▼
var
var
▲ var
var hovertext = "Update Your Status!"
mw.util.addPortletLink("p-
mw.util.addPortletLink("p-
mw.util.addPortletLink("p-
//
mw.util.addPortletLink("p-
mw.util.addPortletLink("p-
mw.util.addPortletLink("p-
▲ //Topbar
// Get new status▼
▲ addPortletLink("p-personal", ONLINEpagetoedit, "Online", "pt-statuspers", hovertext, "", document.getElementById("pt-userpage"));
statusRegExp = /&action=edit&newstatus=(.*)/;▼
▲ addPortletLink("p-personal", OFFLINEpagetoedit, "Offline", "pt-statuspers", hovertext, "", document.getElementById("pt-userpage"));
var status = statusRegExp.exec(___location.href)[1];▼
▲ addPortletLink("p-personal", HUGGLEpagetoedit, "Huggle", "pt-statuspers", hovertext, "", document.getElementById("pt-userpage"));
// Modify the form▼
document.getElementById('wpTextbox1').value = status;▼
▲ if (___location.href.indexOf("&action=edit&newstatus=") == -1) return;
document.getElementById('wpSummary').value = "Updating online status";▼
▲ //Get new status
document.getElementById('wpMinoredit').checked = true;▼
▲ statusRegExp = /&action=edit&newstatus=(.*)/;
// Submit it!▼
▲ var status = statusRegExp.exec(___location.href)[1];
document.getElementById('editform').submit();▼
▲ //Modify the form
▲ document.getElementById('wpTextbox1').value = status;
▲ document.getElementById('wpSummary').value = "Updating online status";
▲ document.getElementById('wpMinoredit').checked = true;
▲ //Submit it!
▲ document.getElementById('editform').submit();
}
|