User:Rillke/SVGEdit-WYSIWYG.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
// Server was shut down - needs a new mirror
mw.loader.using(['mediawiki.user'], function() {
	if (mw.config.get('wgNamespaceNumber') !== 6 || mw.user.isAnon()) return;

	// Register MolWiki RL modules
	mw.loader.addSource( "molwiki", "//mol.wmflabs.org/load.php" );

	mw.config.set({
		'wgSVGEditEditor': '//mol-static.wmflabs.org/svg-edit/editor/svg-editor.html'
	});

	mw.loader.register([
		["ext.svgedit.editor", "1432633881", ["jquery.ui"], "ext.svgedit", "molwiki"],
		["ext.svgedit.editButton", "1432633881", ["ext.svgedit.editor"], "ext.svgedit", "molwiki"],
		["ext.svgedit.inline", "1432633881", ["ext.svgedit.editor"], "ext.svgedit", "molwiki"],
		["ext.svgedit.toolbar", "1432633881", ["ext.svgedit.editor"], "ext.svgedit", "molwiki"]
	]);

	mw.loader.load(['ext.svgedit.editButton']);
});