User:לערי ריינהארט/common.js

From Wikinews, the free news source you can write!
Jump to navigation Jump to search

Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac); IE: hold Ctrl while clicking Refresh, or press Ctrl-F5; Konqueror: simply click the Reload button, or press F5; Opera users may need to completely clear their cache in Tools→Preferences. — More skins

$(function chick_menuAdd() {
	var menuStart = document.createElement("a");
	menuStart.setAttribute('id', 'Chick-menuStart');
	menuStart.setAttribute('class', 'chickMenu');
	MenuAddOn = document.getElementById("bodyContent");
	
	MenuAddOn.appendChild(menuStart);
	var menuText = document.createTextNode("Menu");
	var menuStart = document.getElementById("Chick-menuStart");
	menuStart.appendChild(menuText);
});

/*
<div id="foo">
bar
</div>
*/

$(function() {
	// mw.loader.load("//en.wikinews.org/w/index.php?title=user:Bawolff/sandbox/irc.js&action=raw&ctype=text/javascript");
	
	//load irc login box if on page
	//if(document.getElementById("cgiircbox"))
	//	mw.loader.load("//en.wikinews.org/w/index.php?title=Mediawiki:Irc.js&action=raw&ctype=text/javascript");
	
	mw.loader.load("//en.wikinews.org/w/index.php?title=user:Bawolff/onebox-select-2.js&action=raw&ctype=text/javascript");
	mw.loader.load("//en.wikinews.org/w/index.php?title=user:Bawolff/sandbox/opinion.js&action=raw&ctype=text/javascript");
	//mw.loader.load("//en.wikinews.org/w/index.php?title=User:Bawolff/sandbox/commentWatch.js&action=raw&ctype=text/javascript");
});

/**
 * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
 * @see https://meta.wikimedia.org/wiki/TemplateScript
 * @update-token [[File:pathoschild/templatescript.js]]
 */
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js');

//See [[user:Bawolff/sandbox/validate.js]]
mw.util.addPortletLink("p-tb", "http://validator.w3.org/check?uri=" + encodeURIComponent(location.href), "XHTML Validate", "t-validate");