User:Dross/common.js: Difference between revisions
Appearance
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
$(function() { | $(function() { | ||
$('div | $('#p-navigation > div ul li:last-child').after('<li id="n-createcompany"><a href="#">Create company page</a></li>'); | ||
$('div | $('#p-navigation > div ul li:last-child').after('<li id="n-createtld"><a href="#">Create TLD page</a></li>'); | ||
}); | }); | ||
Revision as of 21:17, 6 October 2018
$(function() {
$('#p-navigation > div ul li:last-child').after('<li id="n-createcompany"><a href="#">Create company page</a></li>');
$('#p-navigation > div ul li:last-child').after('<li id="n-createtld"><a href="#">Create TLD page</a></li>');
});
$('#n-createcompany').onclick(function() {
var pg = prompt('Enter company page name', 'pagename');
if (pg === 'pagename') {
var p = mw.config.get('wgPagename');
} else {
var p = pg;
}
window.location("//icannwiki.org/index.php?title=" + p + "&action=edit&preload=User:Dross/Company");
}
);
$('#n-createtld').onclick(function() {
var pg = prompt('Enter TLD page name', 'pagename');
if (pg === 'pagename') {
var p = mw.config.get('wgPagename');
} else {
var p = pg;
}
window.location("//icannwiki.org/index.php?title=" + p + "&action=edit&preload=User:Dross/TLD");
}
);