User:Dross/common.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
$(function() {
$('div.body > ul li:last-child').after('<li id="n-createcompany">Create company page</li>');
$('div.body > ul li:last-child').after('<li id="n-createtld">Create TLD page</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");
}
);