Jump to content

User:Dross/common.js: Difference between revisions

From ICANNWiki
Dross (talk | contribs)
No edit summary
Dross (talk | contribs)
No edit summary
Line 11: Line 11:
var p = pg;
var p = pg;
}
}
window.location("//icannwiki.org/index.php?title=" + p + "&action=edit&preload=User:Dross/Company");
function() { window.location("//icannwiki.org/index.php?title=" + p + "&action=edit&preload=User:Dross/Company"); }
}
}


Line 23: Line 23:
var p = pg;
var p = pg;
}
}
window.location("//icannwiki.org/index.php?title=" + p + "&action=edit&preload=User:Dross/TLD");
function() { window.location("//icannwiki.org/index.php?title=" + p + "&action=edit&preload=User:Dross/TLD"); }
}
}


$('#n-createtld').onclick = crtld();
$('#n-createtld').onclick = crtld();

Revision as of 21:27, 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>');
});

function crcom() {
var pg = prompt('Enter company page name', 'pagename');
if (pg === 'pagename') {
	var p = mw.config.get('wgPagename');
	} else {
	var p = pg;
	}
function() { window.location("//icannwiki.org/index.php?title=" + p + "&action=edit&preload=User:Dross/Company"); }
}

$('#n-createcompany').onclick = crcom();

function crtld() {
var pg = prompt('Enter TLD page name', 'pagename');
if (pg === 'pagename') {
	var p = mw.config.get('wgPagename');
	} else {
	var p = pg;
	}
function() { window.location("//icannwiki.org/index.php?title=" + p + "&action=edit&preload=User:Dross/TLD"); }
}

$('#n-createtld').onclick = crtld();