Difference between revisions of "MediaWiki:Common.js"
From Civicwiki
(Replaced content with "→Any JavaScript here will be loaded for all users on every page load.: ") |
|||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
+ | /* Adds <data link> button to toolbar */ | ||
+ | $('#wpTextbox1').wikiEditor('addToToolbar', { | ||
+ | 'section': 'main', | ||
+ | 'group': 'format', | ||
+ | 'tools': { | ||
+ | 'datalink': { | ||
+ | label: 'Data Link', | ||
+ | type: 'button', | ||
+ | icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png', | ||
+ | action: { | ||
+ | type: 'encapsulate', | ||
+ | options: { | ||
+ | pre: "{{Test", | ||
+ | post: "}}" | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | }); |
Revision as of 12:37, 15 April 2014
/* Any JavaScript here will be loaded for all users on every page load. */ /* Adds <data link> button to toolbar */ $('#wpTextbox1').wikiEditor('addToToolbar', { 'section': 'main', 'group': 'format', 'tools': { 'datalink': { label: 'Data Link', type: 'button', icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png', action: { type: 'encapsulate', options: { pre: "{{Test", post: "}}" } } } } });