User:Gurwinder/Edittool.js: Difference between revisions
New |
No edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
// combined and modified by [[User:Ilmari Karonen]] | // combined and modified by [[User:Ilmari Karonen]] | ||
// Configuration (to be set from [[Special:MyPage/common. | // Configuration (to be set from [[Special:MyPage/common.jsproofreadButtons = []]): | ||
// window.charinsertCustom – Object. Merged into the default charinsert list. For example, setting | // window.charinsertCustom – Object. Merged into the default charinsert list. For example, setting | ||
// this to { Symbols: '‽' } will add the interrobang to the end of the Symbols section. | // this to { Symbols: '‽' } will add the interrobang to the end of the Symbols section. | ||
| Line 37: | Line 37: | ||
// Please make any changes to [[MediaWiki:Edittools]] as well, however, instead of using the ␥ symbol, use {{#ifeq:{{NAMESPACE}}|{{ns:0}}| | }}. | // Please make any changes to [[MediaWiki:Edittools]] as well, however, instead of using the ␥ symbol, use {{#ifeq:{{NAMESPACE}}|{{ns:0}}| | }}. | ||
charinsert: { | charinsert: { | ||
'Ekatra': '{\{center|+}} {\{right|+}} {\{Block.center|<poem>+</poem>}} {\{Block.center|' + "'''" + '<poem>+</poem>' + "'''" + '}} {\{gap}} {\{gap|1em}} <!--.+_--> <nowiki>+</nowiki> <small>+</small> <big>+</big> {\{rh|left|center|right}} {\{rule}} <br/> <hr/> {\{dhr}}{\{page.break|label=}}{\{dhr}}', | |||
'Insert': ' <!--.+_--> {\{+}} {\{\{+|}}} | [+] [\[+|]] "+" = [\[Category:+]] #Redirect.[\[+]] &nb'+'sp; <nowiki>+</nowiki> ␥Sign: ␥~~\~~ <pagelist+/> <br/>', | 'Insert': ' <!--.+_--> {\{+}} {\{\{+|}}} | [+] [\[+|]] "+" = [\[Category:+]] #Redirect.[\[+]] &nb'+'sp; <nowiki>+</nowiki> ␥Sign: ␥~~\~~ <pagelist+/> <br/>', | ||
'Wikimarkup': '<!--.+_--> <nowiki>+</nowiki> ␥~~\~~ <span.class="plainlinks">+</span> <s>+</s> <sub>+</sub> <sup>+</sup> <ref>+</ref> <ref.name="+"_/> <ref.follow="+"_/> {\{smallrefs}} {\{reflist}} <references./> <includeonly>+</includeonly> <noinclude>+</noinclude> <onlyinclude>+</onlyinclude> <blockquote>+</blockquote> <pre>+</pre> <code>+</code> <tt>+</tt> <syntaxhighlight.lang="html5".enclose="div">+</syntaxhighlight> {\{পূর্বনির্ধারিতবাছাই:+}} {\{hyphenated.word.start|+}} {\{hyphenated.word.end|+}} <small>+</small> <big>+</big> <mark>+</mark> ', | 'Wikimarkup': '<!--.+_--> <nowiki>+</nowiki> ␥~~\~~ <span.class="plainlinks">+</span> <s>+</s> <sub>+</sub> <sup>+</sup> <ref>+</ref> <ref.name="+"_/> <ref.follow="+"_/> {\{smallrefs}} {\{reflist}} <references./> <includeonly>+</includeonly> <noinclude>+</noinclude> <onlyinclude>+</onlyinclude> <blockquote>+</blockquote> <pre>+</pre> <code>+</code> <tt>+</tt> <syntaxhighlight.lang="html5".enclose="div">+</syntaxhighlight> {\{পূর্বনির্ধারিতবাছাই:+}} {\{hyphenated.word.start|+}} {\{hyphenated.word.end|+}} <small>+</small> <big>+</big> <mark>+</mark> ', | ||
'Proofread': '{\{center|+}} {\{center|<poem>+</poem>}} <poem>+</poem> {\{Block.center|+}} {\{Block.center|<poem>+</poem>}} [\[Author:+|]] {\{block.center/s}} {\{block.center/e}} {\{Type|f=|l=|w=|i=|+}} {\{Head2Columns}} {\{TwoColumns}} {\{xxxx-larger|+}} {\{gap}} | 'Proofread': '{\{center|+}} {\{center|<poem>+</poem>}} <poem>+</poem> {\{Block.center|+}} {\{Block.center|<poem>+</poem>}} {\{right|+}} [\[Author:+|]] {\{block.center/s}} {\{block.center/e}} {\{Type|f=|l=|w=|i=|+}} {\{Head2Columns}} {\{TwoColumns}} {\{xxxx-larger|+}} {\{gap}} {\{nop}} {\{rh|left|center|right}} {\{rule}} {\{dhr|3em}}', | ||
'Template': ' {\{xxxx-larger|+}} {\{gap}} {\{nop}} {\{rh|left|center|right}} {\{rule}}', | 'Template': ' {\{xxxx-larger|+}} {\{gap}} {\{nop}} {\{rh|left|center|right}} {\{rule}}', | ||
'IndexPage': ' <pagelist+/> {\{rh|{{{pagenum}}}|Bookname|{{{pagenum}}}}} {\{rule}}', | 'IndexPage': ' <pagelist+/> {\{rh|{{{pagenum}}}|Bookname|{{{pagenum}}}}} {\{rule}}', | ||
| Line 235: | Line 236: | ||
} | } | ||
if ( !window.charinsertDontMove ) { | if ( !window.charinsertDontMove ) { | ||
$( '. | $( '.mw-body-content' ).before( placeholder ); | ||
} | } | ||
// Find the element that is focused | // Find the element that is focused | ||