Difference between revisions of "MediaWiki:Vector.js"

From www.PSALTIKI.info
Jump to: navigation, search
m
m
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for users using the Vector skin */
 
/* Any JavaScript here will be loaded for users using the Vector skin */
 
+
/*
 
importScript("MediaWiki:Hotkeys.js");
 
importScript("MediaWiki:Hotkeys.js");
 
hotkeys = {
 
hotkeys = {
Line 8: Line 8:
 
     't' : '{| class="wikitable"\n! header\n! header\n|-\n| data\n| data\n|}\n'
 
     't' : '{| class="wikitable"\n! header\n! header\n|-\n| data\n| data\n|}\n'
 
};
 
};
 +
*/
 +
 +
/**
 +
* Extra buttons in toolbar
 +
* @stats [[File:Krinkle_InsertWikiEditorButton.js]]
 +
*/
 +
$.ajax({
 +
url: '//localhost:8001/index.php?title=MediaWiki:InsertWikiEditorButton.js&action=raw&ctype=text/javascript',
 +
dataType: 'script',
 +
cache: true
 +
}).done(function () {
 +
 +
// Happy face
 +
krInsertWikiEditorButton({
 +
id: "mw-text-blue",
 +
icon: "/images/BoutonsDefaut03.png",
 +
label: 'make-text-blue',
 +
insertBefore: '<font color="blue">',
 +
insertAfter: '</font>',
 +
sampleText: 'past your text'
 +
});
 +
 +
// RED
 +
krInsertWikiEditorButton({
 +
id: 'mw-text-red',
 +
icon: '/images/redtext.png',
 +
label: 'make-text-red',
 +
insertBefore: '<font color="#de0000">',
 +
insertAfter: '</font>',
 +
sampleText: 'past your text'
 +
});
 +
// DISPLAY TITLE
 +
krInsertWikiEditorButton({
 +
id: 'mw-display-title',
 +
icon: '/images/BoutonsDefaut03.png',
 +
label: 'DISPLAY TITLE',
 +
insertBefore: "{{DISPLAYTITLE:",
 +
insertAfter: "}}",
 +
sampleText: 'past your text'
 +
});
 +
 +
});

Revision as of 08:38, 11 August 2017

/* Any JavaScript here will be loaded for users using the Vector skin */
/*
importScript("MediaWiki:Hotkeys.js");
hotkeys = {
    'b' : 'Brooks was here',
    'l' : '',
    's' : '§',
    't' : '{| class="wikitable"\n! header\n! header\n|-\n| data\n| data\n|}\n'
};
*/

/**
 * Extra buttons in toolbar
 * @stats [[File:Krinkle_InsertWikiEditorButton.js]]
 */
$.ajax({
	url: '//localhost:8001/index.php?title=MediaWiki:InsertWikiEditorButton.js&action=raw&ctype=text/javascript',
	dataType: 'script',
	cache: true
}).done(function () {

	// Happy face
	krInsertWikiEditorButton({
		id: "mw-text-blue",
		icon: "/images/BoutonsDefaut03.png",
		label: 'make-text-blue',
		insertBefore: '<font color="blue">',
		insertAfter: '</font>',
		sampleText: 'past your text'
	});

	// RED
	krInsertWikiEditorButton({
		id: 'mw-text-red',
		icon: '/images/redtext.png',
		label: 'make-text-red',
		insertBefore: '<font color="#de0000">',
		insertAfter: '</font>',
		sampleText: 'past your text'
	});
	// DISPLAY TITLE
	krInsertWikiEditorButton({
		id: 'mw-display-title',
		icon: '/images/BoutonsDefaut03.png',
		label: 'DISPLAY TITLE',
		insertBefore: "{{DISPLAYTITLE:",
		insertAfter: "}}",
		sampleText: 'past your text'
	});

});