Jump to content

User:InvalidOS/unicodeRedirect.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by InvalidOS (talk | contribs) at 17:34, 9 January 2020 (fix?). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
$(document).ready( function () {

var config = {};

config.mw = mw.config.get( [
	'wgPageName'
] );

if (config.mw.wgPageName.length == 1)
{
	var hex = config.mw.wgPageName.charCodeAt(0).toString(16);
	var result;
	if (hex.length <= 4)
	{
		result = "U"+ URIencode("+") + "0000".substring(0, 4 - hex.length) + hex;
	}
	else
	{
		result = "U" + URIencode("+") + hex;
	}
	mw.loader.using(['mediawiki.util']), mw.util.addPortletLink(
		'p-views',
		'index.php?title=' + result + '&action=view',
		'Codepoint',
		'ca-unicode-create',
		'Corresponding Codepoint Page',
		'-',
		document.getElementById('ca-history')
	);
}

/*mw.loader.using(['mediawiki.util']), function () {
	if (mw.util.getParamValue('pageCreate') == "yes")
	{
		
	}
};*/







} );