User:2NumForIce/sandbox/.js

// Currently a copy of User:MusikAnimal/scriptManager.js prior to the syntax fix. Seems to not be working var scriptsToManage; (function {	var $html;	if (mw.config.get('skin') === "vector") {		$html = $(" ");		$html.append(" Enable scripts ");		$html.append("  ");	} else if (mw.config.get('skin') === "vector-2022") {		$html = $(" ");		$html.append(" Enable scripts ");		$html.append("  ");	} else {		$html = $(" ");		$html.append(" Enable scripts ");		$html.append("  ");	}	var loadScript = function(e) { mw.loader.load(e.data.src); $(e.target).parent.remove; }; 	if(scriptsToManage) { $.each(scriptsToManage, function(script, src) {			var scriptName = script.replace(/ /g,"_"),				containerSelector = '#column-one';			$html.find("ul").append(""+script+"");			if (mw.config.get('skin') === 'vector') {				containerSelector = '#mw-panel';			} else if (mw.config.get('skin') === 'vector-2022') {				containerSelector = '.vector-main-menu';			}			$(containerSelector).append($html);			$("#t-enablescript-"+scriptName).click({ script: script, src: src }, loadScript);		}); } else { $html.find("ul").append("No scripts registered!</a></li>"); $(mw.config.get('skin') === "vector" || mw.config.get('skin') === "vector-2022" ? "#mw-panel" : "#column-one").append($html); } });