User talk:Robinr78/common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
var customizeToolbar = function () { | var customizeToolbar = function () { | ||
/* Stable as of 2019- | /* Stable as of 2019-1012-0820 */ | ||
<pre> | |||
var customizeToolbar = function () { | var customizeToolbar = function () { | ||
Line 169: | Line 171: | ||
pre: "{{Historyheader}}<br>", | pre: "{{Historyheader}}<br>", | ||
post: "{{Historyfooter}}<br>" | post: "{{Historyfooter}}<br>" | ||
} | |||
} | |||
} | |||
} | |||
}); | |||
/* Add Iconfooter */ | |||
$('#wpTextbox1').wikiEditor('addToToolbar', { | |||
section: 'SM-201', | |||
group: 'Footer', | |||
tools: { | |||
"Iconfooter": { | |||
label: 'Icon footer', | |||
type: 'button', | |||
icon: 'http://www.sm-201.org/a/images/5/5e/Editor_i.png', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: "{{Iconheader}}<br>", | |||
post: "{{Iconfooter}}<br>" | |||
} | } | ||
} | } | ||
Line 380: | Line 403: | ||
} | } | ||
}); | }); | ||
/* Strike through */ | |||
$('#wpTextbox1').wikiEditor('addToToolbar', { | |||
section: 'SM-201', | |||
group: 'Format', | |||
tools: { | |||
"Strike": { | |||
label: 'Strike', | |||
type: 'button', | |||
icon: 'http://www.sm-201.org/a/images/c/c9/Button_strike.png', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '<s>', | |||
post: '</s>', | |||
} | |||
} | |||
} | |||
} | |||
}); | |||
Line 401: | Line 445: | ||
} | } | ||
} ); | } ); | ||
Line 508: | Line 549: | ||
}); | }); | ||
/* ================================ | /* ================================ Add Category Buttons =================================== */ | ||
/* | /* Toolbar Category Button */ | ||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | ||
section: 'Cats', | section: 'Cats', | ||
Line 518: | Line 558: | ||
tools: { | tools: { | ||
"Cats": { | "Cats": { | ||
label: ' | label: 'Category', | ||
type: 'button', | type: 'button', | ||
icon: 'http://www.sm-201.org/a/images/ | icon: 'http://www.sm-201.org/a/images/d/d0/Button_Cat.Png', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '[[Category: | pre: '[[Category:', | ||
post: '' | post: ']]' | ||
} | } | ||
} | } | ||
Line 532: | Line 572: | ||
} ); | } ); | ||
/* Artist Category Button */ | |||
/* | |||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | ||
section: 'Cats', | section: 'Cats', | ||
Line 539: | Line 578: | ||
tools: { | tools: { | ||
"Cats": { | "Cats": { | ||
label: ' | label: 'Artist', | ||
type: 'button', | type: 'button', | ||
icon: 'http://www.sm-201.org/a/images/ | icon: 'http://www.sm-201.org/a/images/3/32/Button-art.png', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '[[Category: | pre: '[[Category:Artist]] [[Category:Art forms]]', | ||
post: '' | post: '' | ||
} | } | ||
Line 553: | Line 592: | ||
} ); | } ); | ||
/* | |||
/* Author Category Button */ | |||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | ||
section: 'Cats', | section: 'Cats', | ||
Line 559: | Line 599: | ||
tools: { | tools: { | ||
"Cats": { | "Cats": { | ||
label: ' | label: 'Author', | ||
type: 'button', | type: 'button', | ||
icon: 'http://www.sm-201.org/a/images/ | icon: 'http://www.sm-201.org/a/images/1/15/Button-quil.png', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '[[Category:', | pre: '[[Category:Author]]', | ||
post: ' | post: '' | ||
} | } | ||
} | } | ||
Line 585: | Line 625: | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: ' | pre: '[[Category:Human anatomy]]', | ||
post: '' | post: '' | ||
} | } | ||
Line 605: | Line 645: | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: ' | pre: '[[Category:Book]]', | ||
post: '' | post: '' | ||
} | } | ||
Line 620: | Line 660: | ||
label: 'Classes', | label: 'Classes', | ||
type: 'button', | type: 'button', | ||
icon: 'http://www.sm-201.org/a/images/ | icon: 'http://www.sm-201.org/a/images/6/67/Cat-class.jpg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
Line 641: | Line 681: | ||
label: '{{Club}}', | label: '{{Club}}', | ||
type: 'button', | type: 'button', | ||
icon: 'http://www.sm-201.org/a/images/ | icon: 'http://www.sm-201.org/a/images/3/31/Cat-club.jpg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
Line 653: | Line 693: | ||
} ); | } ); | ||
/* Toolbar "Club" category Button */ | |||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | |||
section: 'Cats', | |||
group: 'Cats', | |||
tools: { | |||
"Template": { | |||
label: 'Corset', | |||
type: 'button', | |||
icon: 'http://www.sm-201.org/a/images/0/0d/Cat-corset.jpg', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '[[Category:Corsetry]]', | |||
post: '' | |||
} | |||
} | |||
} | |||
} | |||
} ); | |||
/* Toolbar Director/Producers category Button */ | |||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | |||
section: 'Cats', | |||
group: 'Cats', | |||
tools: { | |||
"Template": { | |||
label: 'Director', | |||
type: 'button', | |||
icon: 'http://www.sm-201.org/a/images/4/4a/Cat-meg.jpg', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{cat2|Director articles | Producer articles}} ' | |||
/* post: '' */ | |||
} | |||
} | |||
} | |||
} | |||
} ); | |||
/* Toolbar "Events" category Button */ | /* Toolbar "Events" category Button */ | ||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | ||
Line 662: | Line 741: | ||
label: 'Events', | label: 'Events', | ||
type: 'button', | type: 'button', | ||
icon: 'http://www.sm-201.org/a/images/ | icon: 'http://www.sm-201.org/a/images/9/96/Cat-event.jpg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
Line 673: | Line 752: | ||
} | } | ||
} ); | } ); | ||
/* Toolbar Fetish category Button */ | |||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | |||
section: 'Cats', | |||
group: 'Cats', | |||
tools: { | |||
"Template": { | |||
label: 'Fetish', | |||
type: 'button', | |||
icon: 'http://www.sm-201.org/a/images/9/9f/Cat-ballet.jpg', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '[[Category:Fetish articles]]', | |||
post: '' | |||
} | |||
} | |||
} | |||
} | |||
} ); | |||
/* Toolbar Film category button */ | /* Toolbar Film category button */ | ||
Line 682: | Line 783: | ||
label: 'Film', | label: 'Film', | ||
type: 'button', | type: 'button', | ||
icon: 'http://www.sm-201.org/a/images/ | icon: 'http://www.sm-201.org/a/images/b/bd/Cat-film.jpg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '[[ | pre: '[[Category:Filmography articles]]', | ||
post: '' | post: '' | ||
} | } | ||
Line 702: | Line 803: | ||
label: 'Health', | label: 'Health', | ||
type: 'button', | type: 'button', | ||
icon: 'http://www.sm-201.org/a/images/ | icon: 'http://www.sm-201.org/a/images/b/ba/Cat-health.jpg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '[[ | pre: '[[Category:Health]]', | ||
post: '' | post: '' | ||
} | } | ||
Line 713: | Line 814: | ||
} | } | ||
} ); | } ); | ||
/* Toolbar Icon category Button */ | /* Toolbar Icon category Button */ | ||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | ||
Line 747: | Line 849: | ||
options: { | options: { | ||
pre: '[[Category:Link]]', | pre: '[[Category:Link]]', | ||
post: '[[Category:Lists]]' | |||
} | |||
} | |||
} | |||
} | |||
} ); | |||
/* Toolbar Magazine category Button */ | |||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | |||
section: 'Cats', | |||
group: 'Cats', | |||
tools: { | |||
"Magazine": { | |||
label: 'Magazine', | |||
type: 'button', | |||
icon: 'http://www.sm-201.org/a/images/6/6d/Editor_m_.png', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '[[Category:Magazine]][[Category:Bondage magazine]][[Category:Fetish magazine]]', | |||
post: '' | post: '' | ||
} | } | ||
Line 753: | Line 876: | ||
} | } | ||
} ); | } ); | ||
/* Toolbar Magazine category Button */ | |||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | |||
section: 'Cats', | |||
group: 'Cats', | |||
tools: { | |||
"Model": { | |||
label: 'Model', | |||
type: 'button', | |||
icon: 'http://www.sm-201.org/a/images/e/ea/Cat-model.jpg', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{cat3|Bondage model|Fetish model|Pinup model}}', | |||
post: '' | |||
} | |||
} | |||
} | |||
} | |||
} ); | |||
Line 776: | Line 921: | ||
/* Toolbar | /* Toolbar Photography categories Button */ | ||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | ||
section: 'Cats', | section: 'Cats', | ||
group: 'Cats', | group: 'Cats', | ||
tools: { | tools: { | ||
" | "Template": { | ||
label: ' | label: 'Photogs', | ||
type: 'button', | type: 'button', | ||
icon: 'http://www.sm-201.org/a/images/ | icon: 'http://www.sm-201.org/a/images/e/e8/Cat-photo.jpg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '[[Bondage photographer]] [[Fetish photographer]]', | |||
post: '[[Pinup photographer]]' | |||
} | } | ||
} | } | ||
Line 796: | Line 941: | ||
} ); | } ); | ||
/* Toolbar | /* Toolbar Photography categories Button */ | ||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | ||
section: 'Cats', | section: 'Cats', | ||
group: 'Cats', | group: 'Cats', | ||
tools: { | tools: { | ||
" | "Template": { | ||
label: 'Places', | label: 'Places', | ||
type: 'button', | type: 'button', | ||
icon: 'http://www.sm-201.org/a/images/ | icon: 'http://www.sm-201.org/a/images//bf/Editor_p.jpg', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '[[Category:Places]] [[Cateory:Settings]]', | |||
post: '' | |||
} | |||
} | |||
} | |||
} | |||
} ); | |||
/* Toolbar ProDom categories Button */ | |||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | |||
section: 'Cats', | |||
group: 'Cats', | |||
tools: { | |||
"ProDom": { | |||
label: 'ProDom', | |||
type: 'button', | |||
icon: 'http://www.sm-201.org/a/images/a/a8/Cat-pro.jpg', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '{{cat3|Professional Dom|Professional Sub| Prodom venue}}', | |||
post: '' | post: '' | ||
} | } | ||
Line 815: | Line 984: | ||
} | } | ||
} ); | } ); | ||
/* Toolbar Stories by Robin category Button */ | /* Toolbar Stories by Robin category Button */ | ||
Line 856: | Line 1,026: | ||
} | } | ||
} ); | } ); | ||
/* Toolbar Spanking categories Button */ | |||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | |||
section: 'Cats', | |||
group: 'Cats', | |||
tools: { | |||
"Template": { | |||
label: 'Spanking', | |||
type: 'button', | |||
icon: 'http://www.sm-201.org/a/images/9/99/Cat-spank.jpg', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '[[Category:Spanking articles]]' | |||
/* post: '' */ | |||
} | |||
} | |||
} | |||
} | |||
} ); | |||
/* Toolbar Toy box category Button */ | /* Toolbar Toy box category Button */ | ||
Line 869: | Line 1,061: | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: '[[Category:Sex toys]]', | pre: '[[Category:Sex toys]] [[Category:Bondage equipment]]', | ||
post: '' | post: '' | ||
} | |||
} | |||
} | |||
} | |||
} ); | |||
/* Toolbar BD on TV categories Button */ | |||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | |||
section: 'Cats', | |||
group: 'Cats', | |||
tools: { | |||
"Template": { | |||
label: 'BD on TV', | |||
type: 'button', | |||
icon: 'http://www.sm-201.org/a/images/2/25/Cat-tv.jpg', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '[[Category:bondage on TV articles]]', | |||
post: '' | |||
} | } | ||
} | } |
Revision as of 15:23, 12 October 2019
var customizeToolbar = function () { /* Stable as of 2019-1012-0820 */ <pre> var customizeToolbar = function () { /* ======================================Add SM-201 & category Sections */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'sections': { 'SM-201': { 'type': 'toolbar', // Can also be 'booklet' 'label': 'SM-201' } } } ); $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'sections': { 'Cats': { 'type': 'toolbar', // Can also be 'booklet' 'label': 'Cats' } } } ); /* ===============================================================Add groups */ /* -------------------add Format group ------------------- */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'SM-201', 'groups': { 'Format': { 'label': 'Format' } } } ); /* ------------------- add <inc> group ----------------------*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'SM-201', 'groups': { 'Inc': { 'label': 'Inc' } } } ); /* ------------------- add footers group ----------------------*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'SM-201', 'groups': { 'Footer': { 'label': 'Footer' } } } ); /* ------------------- add Categories group -----------------*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'Cats', 'groups': { 'Cats': { 'label': 'Cats' } } } ); /* Add <Inc> buttons ============================================================ */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Inc', tools: { "Incl": { label: 'Incl', type: 'button', icon: 'http://www.sm-201.org/a/images/3/3b/Button_in.jpg', action: { type: 'encapsulate', options: { pre: "<includeonly>", post:"</includeonly>" } } } } }); $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Inc', tools: { "Noinclude": { label: 'Noinclude', type: 'button', icon: 'http://www.sm-201.org/a/images/1/1b/Button_no.jpg', action: { type: 'encapsulate', options: { pre: "<noinclude>", post:"</noinclude>" } } } } }); /* Add footer buttons ============================================================*/ /* Add Footers */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Footer": { label: 'Footer', type: 'button', icon: 'http://www.sm-201.org/a/images/3/31/Editor_f.png', action: { type: 'encapsulate', options: { pre: "{{Header}}<br>", post:"{{Footer}}<br>" } } } } }); /* Add Biofooters - Biographies */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Biofooter": { label: 'Biofooter', type: 'button', icon: 'http://www.sm-201.org/a/images/b/b4/Editor_b.png', action: { type: 'encapsulate', options: { pre: "{{Bioheader}}<br>", post:"{{Biofooter}}<br>" } } } } }); /* Add Historyfooter */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Historyfooter": { label: 'History footer', type: 'button', icon: 'http://www.sm-201.org/a/images/e/e4/Editor_h.png', action: { type: 'encapsulate', options: { pre: "{{Historyheader}}<br>", post: "{{Historyfooter}}<br>" } } } } }); /* Add Iconfooter */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Iconfooter": { label: 'Icon footer', type: 'button', icon: 'http://www.sm-201.org/a/images/5/5e/Editor_i.png', action: { type: 'encapsulate', options: { pre: "{{Iconheader}}<br>", post: "{{Iconfooter}}<br>" } } } } }); /* Add Libfooter Library*/ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Libraryfooter": { label: 'Libraryfooter', type: 'button', icon: 'http://www.sm-201.org/a/images/e/e0/Editor_book.png', action: { type: 'encapsulate', options: { pre: "{{Libheader}}<br>", post: "{{Libfooter}}<br>" } } } } }); /* Add Lifefooter */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Life Lessons footer": { label: 'Lifefooter', type: 'button', icon: 'http://www.sm-201.org/a/images/1/16/Editor_l.png', action: { type: 'encapsulate', options: { pre: "{{Lifeheader}}<br>", post: "{{Lifefooter}}<br>" } } } } }); /* Add Macrofooter */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Life Lessons footer": { label: 'Macrofooter', type: 'button', icon: 'http://www.sm-201.org/a/images/f/fc/Editor_mac.png', action: { type: 'encapsulate', options: { pre: "{{Macroheader}}", post: "{{Macrofooter}}" } } } } }); /* Add Microfooter */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Micropedia footers": { label: 'Microfooter', type: 'button', icon: 'http://www.sm-201.org/a/images/9/95/Editor_mic.png', action: { type: 'encapsulate', options: { pre: "{{Microheader}}", post: "{{Microfooter}}" } } } } }); /* Add PMfooters */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Robins Personal memories": { label: 'Robin Mem', type: 'button', icon: 'http://www.sm-201.org/a/images/b/bf/Editor_p.png', action: { type: 'encapsulate', options: { pre: "{{Pmheader}}", post: "{{Pmfooter}}" } } } } }); /* Add Storyfooters */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Storyfooter": { label: 'Storyfooter', type: 'button', icon: 'http://www.sm-201.org/a/images/6/60/Editor_s.png', action: { type: 'encapsulate', options: { pre: "{{Storyheader}}<br>", post:"{{Storyfooter}}<br>" } } } } }); /* Add Timefooters */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Timefooter": { label: 'Timefooter', type: 'button', icon: 'http://www.sm-201.org/a/images/1/19/Editor_t.png', action: { type: 'encapsulate', options: { pre: "{{Timeheader}}<br>", post:"{{Timefooter}}<br>" } } } } }); /*=====================Format Buttons====================================*/ /* Toolbar <Comment Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Comment": { label: 'Comment', type: 'button', icon: 'http://www.sm-201.org/a/images/6/66/Editor_!.png', action: { type: 'encapsulate', options: { pre: '<!-- ', post: ' -->' } } } } } ); /* Toolbar Apostrophe Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Apostrope": { label: 'Apostrphe', type: 'button', icon: 'http://www.sm-201.org/a/images/3/39/Editor_apos.png', action: { type: 'encapsulate', options: { pre: "'", post: "'" } } } } } ); /* Add 'clear' =====================*/ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Clear": { label: 'Clear', type: 'button', icon: 'http://sm-201.org/a/images/b/be/Editor_c.png', action: { type: 'encapsulate', options: { pre: '<br clear="all"> ', post: '' } } } } }); /* Strike through */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Strike": { label: 'Strike', type: 'button', icon: 'http://www.sm-201.org/a/images/c/c9/Button_strike.png', action: { type: 'encapsulate', options: { pre: '<s>', post: '</s>', } } } } }); /* Toolbar gallery button =======================*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Gallery": { label: 'Gallery', type: 'button', icon: 'http://www.sm-201.org/a/images/3/35/Editor_g.png', action: { type: 'encapsulate', options: { pre: '<gallery mode="packed> ', post: '</gallery>' } } } } } ); /* Toolbar [[ ]] Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Template": { label: 'Link', type: 'button', icon: 'http://www.sm-201.org/a/images/c/c0/Button_link.png', action: { type: 'encapsulate', options: { pre: '[[', post: ']]' } } } } } ); /* Toolbar double curly brackets Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'format', tools: { "Template": { label: 'Template', type: 'button', icon: 'http://www.sm-201.org/a/images/5/5f/Button_temp.png', action: { type: 'encapsulate', options: { pre: "{{", post: "}}" } } } } } ); /* Quotes */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Quotes": { label: 'Quotes', type: 'button', icon: 'http://www.sm-201.org/a/images/7/7d/Button_quot.png', action: { type: 'encapsulate', options: { pre: '"', post: '"', } } } } }); /* Center */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Center": { label: 'Center', type: 'button', icon: 'http://www.sm-201.org/a/images/5/5f/Button_center.png', action: { type: 'encapsulate', options: { pre: '<center>', post: '</center>', } } } } }); /* Justify */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Justify": { label: 'Justify', type: 'button', icon: 'http://www.sm-201.org/a/images/0/0f/Button_just.png', action: { type: 'encapsulate', options: { pre: '<p align="justify">', post: '</p>', } } } } }); /* ================================ Add Category Buttons =================================== */ /* Toolbar Category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Cats": { label: 'Category', type: 'button', icon: 'http://www.sm-201.org/a/images/d/d0/Button_Cat.Png', action: { type: 'encapsulate', options: { pre: '[[Category:', post: ']]' } } } } } ); /* Artist Category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Cats": { label: 'Artist', type: 'button', icon: 'http://www.sm-201.org/a/images/3/32/Button-art.png', action: { type: 'encapsulate', options: { pre: '[[Category:Artist]] [[Category:Art forms]]', post: '' } } } } } ); /* Author Category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Cats": { label: 'Author', type: 'button', icon: 'http://www.sm-201.org/a/images/1/15/Button-quil.png', action: { type: 'encapsulate', options: { pre: '[[Category:Author]]', post: '' } } } } } ); /* Toolbar Anatomy category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Human anatomy', type: 'button', icon: 'http://www.sm-201.org/a/images/e/e0/Editor_a.png', action: { type: 'encapsulate', options: { pre: '[[Category:Human anatomy]]', post: '' } } } } } ); /* Toolbar Anatomy category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Book', type: 'button', icon: 'http://www.sm-201.org/a/images/b/b4/Editor_b.png', action: { type: 'encapsulate', options: { pre: '[[Category:Book]]', post: '' } } } } } ); /* Toolbar "Classes" category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Classes', type: 'button', icon: 'http://www.sm-201.org/a/images/6/67/Cat-class.jpg', action: { type: 'encapsulate', options: { pre: '[[Category:Classes]]', post: '' } } } } } ); /* Toolbar "Club" category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: '{{Club}}', type: 'button', icon: 'http://www.sm-201.org/a/images/3/31/Cat-club.jpg', action: { type: 'encapsulate', options: { pre: '[[Category:Club]]', post: '' } } } } } ); /* Toolbar "Club" category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Corset', type: 'button', icon: 'http://www.sm-201.org/a/images/0/0d/Cat-corset.jpg', action: { type: 'encapsulate', options: { pre: '[[Category:Corsetry]]', post: '' } } } } } ); /* Toolbar Director/Producers category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Director', type: 'button', icon: 'http://www.sm-201.org/a/images/4/4a/Cat-meg.jpg', action: { type: 'encapsulate', options: { pre: '{{cat2|Director articles | Producer articles}} ' /* post: '' */ } } } } } ); /* Toolbar "Events" category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Events": { label: 'Events', type: 'button', icon: 'http://www.sm-201.org/a/images/9/96/Cat-event.jpg', action: { type: 'encapsulate', options: { pre: '[[Category:Events]]', post: '' } } } } } ); /* Toolbar Fetish category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Fetish', type: 'button', icon: 'http://www.sm-201.org/a/images/9/9f/Cat-ballet.jpg', action: { type: 'encapsulate', options: { pre: '[[Category:Fetish articles]]', post: '' } } } } } ); /* Toolbar Film category button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Film": { label: 'Film', type: 'button', icon: 'http://www.sm-201.org/a/images/b/bd/Cat-film.jpg', action: { type: 'encapsulate', options: { pre: '[[Category:Filmography articles]]', post: '' } } } } } ); /* Toolbar Health category button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Health": { label: 'Health', type: 'button', icon: 'http://www.sm-201.org/a/images/b/ba/Cat-health.jpg', action: { type: 'encapsulate', options: { pre: '[[Category:Health]]', post: '' } } } } } ); /* Toolbar Icon category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Icon": { label: 'Icon', type: 'button', icon: 'http://www.sm-201.org/a/images/5/5e/Editor_i.png', action: { type: 'encapsulate', options: { pre: '[[Category:Icon]]', post: '' } } } } } ); /* Toolbar Link category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Link": { label: 'Link', type: 'button', icon: 'http://www.sm-201.org/a/images/1/16/Editor_l.png', action: { type: 'encapsulate', options: { pre: '[[Category:Link]]', post: '[[Category:Lists]]' } } } } } ); /* Toolbar Magazine category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Magazine": { label: 'Magazine', type: 'button', icon: 'http://www.sm-201.org/a/images/6/6d/Editor_m_.png', action: { type: 'encapsulate', options: { pre: '[[Category:Magazine]][[Category:Bondage magazine]][[Category:Fetish magazine]]', post: '' } } } } } ); /* Toolbar Magazine category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Model": { label: 'Model', type: 'button', icon: 'http://www.sm-201.org/a/images/e/ea/Cat-model.jpg', action: { type: 'encapsulate', options: { pre: '{{cat3|Bondage model|Fetish model|Pinup model}}', post: '' } } } } } ); /* Toolbar N=Info Box category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Info box": { label: 'Info box', type: 'button', icon: 'http://www.sm-201.org/a/images/0/0e/Editor_n.png', action: { type: 'encapsulate', options: { pre: '[[Category:Info box]]', post: '' } } } } } ); /* Toolbar Photography categories Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Photogs', type: 'button', icon: 'http://www.sm-201.org/a/images/e/e8/Cat-photo.jpg', action: { type: 'encapsulate', options: { pre: '[[Bondage photographer]] [[Fetish photographer]]', post: '[[Pinup photographer]]' } } } } } ); /* Toolbar Photography categories Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Places', type: 'button', icon: 'http://www.sm-201.org/a/images//bf/Editor_p.jpg', action: { type: 'encapsulate', options: { pre: '[[Category:Places]] [[Cateory:Settings]]', post: '' } } } } } ); /* Toolbar ProDom categories Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "ProDom": { label: 'ProDom', type: 'button', icon: 'http://www.sm-201.org/a/images/a/a8/Cat-pro.jpg', action: { type: 'encapsulate', options: { pre: '{{cat3|Professional Dom|Professional Sub| Prodom venue}}', post: '' } } } } } ); /* Toolbar Stories by Robin category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Robin": { label: 'Robin', type: 'button', icon: 'http://www.sm-201.org/a/images/d/d5/Editor_r.png', action: { type: 'encapsulate', options: { pre: '[[Category:Stories by Robin]]', post: '' } } } } } ); /* Toolbar Sessions category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Sessions": { label: 'Sessions', type: 'button', icon: 'http://www.sm-201.org/a/images/6/60/Editor_s.png', action: { type: 'encapsulate', options: { pre: '[[Category:Sessions]]', post: '' } } } } } ); /* Toolbar Spanking categories Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Spanking', type: 'button', icon: 'http://www.sm-201.org/a/images/9/99/Cat-spank.jpg', action: { type: 'encapsulate', options: { pre: '[[Category:Spanking articles]]' /* post: '' */ } } } } } ); /* Toolbar Toy box category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Toy box": { label: 'Toy box', type: 'button', icon: 'http://www.sm-201.org/a/images/1/19/Editor_t.png', action: { type: 'encapsulate', options: { pre: '[[Category:Sex toys]] [[Category:Bondage equipment]]', post: '' } } } } } ); /* Toolbar BD on TV categories Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'BD on TV', type: 'button', icon: 'http://www.sm-201.org/a/images/2/25/Cat-tv.jpg', action: { type: 'encapsulate', options: { pre: '[[Category:bondage on TV articles]]', post: '' } } } } } ); /* Leave everything below this line alone ===================== */ }; /* 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 ); } } ); }