MediaWiki talk:MatchSplit.js: Difference between revisions
→Toolbar button for the "new" toolbar: new section |
→Toolbar button for the "new" toolbar: update icon |
||
| Line 69: | Line 69: | ||
label: 'Match', |
label: 'Match', |
||
type: 'button', |
type: 'button', |
||
icon: '//upload.wikimedia.org/wikipedia/commons/ |
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/25/Ic_set_split_24px.svg/24px-Ic_set_split_24px.svg.png', |
||
action: { |
action: { |
||
type: 'encapsulate', |
type: 'encapsulate', |
||
Revision as of 15:30, 16 December 2020
fa.wikisource
please add
- 'fa':'برگه',
or
- 'fa':'%D8%A8%D8%B1%DA%AF%D9%87', (like other none Latin wikis)
- also
- 'fa': 104,
thank you Reza1615 12:02, 5 October 2011 (UTC)
Done Candalua 19:38, 23 January 2012 (UTC)
et.wikisource
Please add
- 'et':'Lehek%C3%BClg',
and
- 'et': 102,
Thanks! 88.196.241.249 12:34, 14 June 2012 (UTC)
- done — Phe 12:54, 14 June 2012 (UTC)
Syntaxe
Server side now support adding a step= to the __MATCH__ pagename, old syntaxe is supported ==__MATCH__:[[Page:Columelle - L'Économie rurale, Tome 1, trad Du Bois, 1844.djvu/127]]== do the same things than ==__MATCH__:[[Page:Columelle - L'Économie rurale, Tome 1, trad Du Bois, 1844.djvu/127|step=1]]== while ==__MATCH__:[[Page:Columelle - L'Économie rurale, Tome 1, trad Du Bois, 1844.djvu/127|step=2]]== while try to match page 127, then 129, then 131. This allow to match and split bilingual works. step= can use any integer value though I guess only step=2 is useful. — Phe 13:47, 12 February 2016 (UTC)
bn.wikisource
- 'bn':'পাতা',
or
- 'bn':'.E0.A6.AA.E0.A6.BE.E0.A6.A4.E0.A6.BE', -- Bodhisattwa (talk) 15:54, 7 September 2016 (UTC)
- @Bodhisattwa:
Done (I don't fell confortable with JavaScript, can someone confirm it work). Cdlt, VIGNERON (talk) 15:58, 9 September 2016 (UTC)
nap.source
Can you please add:
nap:Paggena
Thanks! --Ruthven (talk) 08:56, 21 December 2019 (UTC)
- I don’t have the rights to do it (see m:Interface administrators) @Ankry, Jon Harald Søby: could you do it? Cdlt, VIGNERON (talk) 09:19, 21 December 2019 (UTC)
pt
Please change pt value to Página. Lugusto (talk) 20:21, 26 March 2020 (UTC)
ru
@Phe, Candalua: in Russian Wikisource don't works the link "split" addition due to a typo in namespace. Could you in "function add_split_button()" replace
var prefix = page_prefixes[mw.config.get('wgContentLanguage')]+":";
to
var prefix = mw.config.get('wgFormattedNamespaces')[104]+":";
? In addition, then the "page_prefixes" definition may become unnecessary. --Vladis13 (talk) 12:08, 31 May 2020 (UTC)
Toolbar button for the "new" toolbar
Hi, The gadget doesn't add a button to the current standard toolbar as advertised. Something like the following works:
var customizeToolbar = function () {
$('#wpTextbox1').wikiEditor('addToToolbar', {
'section': 'advanced',
'group': 'insert',
'tools': {
'smile': {
label: 'Match',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/25/Ic_set_split_24px.svg/24px-Ic_set_split_24px.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "==__MATCH__:[[",
post: "]]=="
}
}
}
}
});
};
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
mw.loader.using( 'user.options' ).then( function () {
// This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
$.when(
mw.loader.using( 'ext.wikiEditor' ), $.ready
).then( customizeToolbar );
}
} );
}
Does anyone still use the old toolbar? I can't even get it to show up any more! Inductiveload (talk) 10:43, 27 November 2020 (UTC)