User talk:Robinr78/common.js
Jump to navigation
Jump to search
/* stable as of 11/11/19 */
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 files group ----------------------*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'SM-201', 'groups': { 'Files': { 'label': 'Files' } } } ); /* ------------------- 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 Needs group ----------------------*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'SM-201', 'groups': { 'Needs': { 'label': 'Needs' } } } ); /* ------------------- 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>" } } } } }); $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Inc', tools: { "Nowiki": { label: 'Nowiki', type: 'button', icon: 'http://www.sm-201.org/a/images/a/a6/Button_quiet.jpg', action: { type: 'encapsulate', options: { pre: "", post:"" } } } } }); /* ================================================================== Needs ======*/ /* Toolbar Category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Needs', 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: ']]' } } } } } ); $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Needs', tools: { "Needs": { label: 'Header', type: 'button', icon: 'http://www.sm-201.org/a/images/e/e4/Editor_h.png', action: { type: 'encapsulate', options: { pre: "{{Header}} ", post:"" } } } } }); $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Needs', tools: { "Footer": { label: 'Footer', type: 'button', icon: 'http://www.sm-201.org/a/images/3/31/Editor_f.png', action: { type: 'encapsulate', options: { pre: "{{Footer}} ", post:"" } } } } }); $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Needs', tools: { "Needs": { label: 'Needs', type: 'button', icon: 'http://www.sm-201.org/a/images/0/0e/Editor_n.png', action: { type: 'encapsulate', options: { pre: "{{Needs}} ", post:"" } } } } }); $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Needs', tools: { "Needs": { label: 'Wikimain', type: 'button', icon: 'http://www.sm-201.org/a/images/8/82/Wikilogo-20.png', action: { type: 'encapsulate', options: { pre: "{{Wikimain|_| }}", post:"" } } } } }); $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Needs', tools: { "Needs": { label: '@', type: 'button', icon: 'http://www.sm-201.org/a/images/e/eb/Button_@.png', action: { type: 'encapsulate', options: { pre: "{{WorldMap|", post:"}} {{@wr}}" } } } } }); /* =================================================== 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}} ", post:"{{Footer}} " } } } } }); /* 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}}", post:"{{Biofooter}}" } } } } }); /* 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 RLPMfooters */ $('#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 RL footers */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Resource Guide": { label: 'Resources', type: 'button', icon: 'http://www.sm-201.org/a/images/d/d5/Editor_r.png', action: { type: 'encapsulate', options: { pre: "{{rl-header}} ", post: "{{rl-footer}}" } } } } }); /* 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}} ", post:"{{Storyfooter}}" } } } } }); /* 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}} ", post:"{{Timefooter}}" } } } } }); /*===================================================Format Button====*/ /* 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: '' } } } } }); $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Item": { label: 'Item', type: 'button', icon: 'http://sm-201.org/a/images/0/02/Button_dot.png', action: { type: 'encapsulate', options: { pre: ' • [[', post: ']]' } } } } }); /* Add Files group buttons ========================================================== */ /* Toolbar Models category Buttons */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Files', tools: { "Bond70": { label: 'Bond70', type: 'button', icon: 'http://www.sm-201.org/a/images/e/ea/Cat-model.jpg', action: { type: 'encapsulate', options: { pre: '{{bond-1970|', post: '}}' } } } } } ); /* Toolbar copyright button =======================*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Files', tools: { "Copy": { label: 'Copy', type: 'button', icon: 'http://www.sm-201.org/a/images/2/22/Button-copy.jpg', action: { type: 'encapsulate', options: { pre: 'Copyright info not available/ownership unkown', post: '' } } } } } ); /* Toolbar date button =======================*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Files', tools: { "Date": { label: 'Date', type: 'button', icon: 'http://www.sm-201.org/a/images/0/01/Button-cal.jpg', action: { type: 'encapsulate', options: { pre: '06/01/2018', post: '' } } } } } ); /* Toolbar gallery button =======================*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Files', 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" heights="200px"> ', post: '</gallery>' } } } } } ); /* Toolbar thumb button =======================*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Files', tools: { "Thumb": { label: 'Thumb', type: 'button', icon: 'http://www.sm-201.org/a/images/6/6f/Button_thumb.jpg', action: { type: 'encapsulate', options: { pre: '[[File', post: '|thumb|right|130px| ]]' } } } } } ); /* Add Book Title */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Files', tools: { "Book title": { label: 'Book Title', type: 'button', icon: 'http://www.sm-201.org/a/images/e/e0/Editor_book.png', action: { type: 'encapsulate', options: { pre: '"<I>', post: '</I>"' } } } } }); /* 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 [[ ]] 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: '"', } } } } }); /* MulttiColumns */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Columns": { label: 'Columns', type: 'button', icon: 'http://www.sm-201.org/a/images/0/04/Button_multicol.png', action: { type: 'encapsulate', options: { pre: "<div style='-moz-column-count:2; column-count:2;'>", post: "</div>", } } } } }); /* 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: '{{Artists}} {{Art forms}} {{Art techniques}} ', post: ' {{BDSM artists}} {{Fetish artists}} {{Pin-up artists}} {{Vintart}} ' } } } } } ); /* Author Category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Cats": { label: 'Authors', type: 'button', icon: 'http://www.sm-201.org/a/images/1/15/Button-quil.png', action: { type: 'encapsulate', options: { pre: '{{Adult authors}} {{BDSM authors}} {{Fetish authors}} ', post: '{{SciFi authors}} ' } } } } } ); /* 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: '{{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: '{{Books}} {{Art books}} {{BDSM books}} {{Fetbooks}} {{Novels}} {{Photobooks}} {{Vintbooks}} ', 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: '{{Classes}} {{BD classes}} {{schools}}', 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: '{{Club}} {{Clubbing}} {{org}} {{night}} {{bd 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: '{{Corsets}} {{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: '{{Directors}} {{Producers}} ' /* 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: '{{events}} {{BD 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: '{{fetish articles}} {{fetish clubs}} {{fetish events}}', 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: '{{Filmography}}', 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: '{{Health}}', post: '' } } } } } ); /* Toolbar History category button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "History": { label: 'History', type: 'button', icon: 'http://www.sm-201.org/a/images/e/e4/Editor_h.png', action: { type: 'encapsulate', options: { pre: '{{BD history}} {{History}}', 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: '{{Icons}} {{Index}} {{menu}}', 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: '{{Links}} {{lists}}', post: '' } } } } } ); /* 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: '{{Mags}} {{Bondmags}} {{Fetmags}}', post: '' } } } } } ); /* Toolbar Models category Buttons */ $( '#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: '{{Bondmodel}} {{fetmodel}} {{pinmodel}}', 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: '{{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: '{{Bondphotog}} {{Fetphotog}} {{Pinphotog}}', post: '' } } } } } ); /* 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/b/bf/Editor_p.png', action: { type: 'encapsulate', options: { pre: '{{places}} {{locations}} {{settings}}', post: '' } } } } } ); /* Toolbar Photography categories Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Spiderpool', type: 'button', icon: 'http://www.sm-201.org/a/images/b/bc/Cat-spider.jpg', action: { type: 'encapsulate', options: { pre: '{{Spiderpool}}', 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: '{{prodom}} {{prosub}} {{provenue}}', 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: '{{Sessions}} {{session content}} ', 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: '{{cat-Spanking-a}} {{spanking furniture}} {{cat-Spanking-f}} {{Spanking implements}} {{cat-Spanking-i}} ', post: '{{Spanking positions}} {{cat-Spanking-p}} {{Spanking terms}} {{cat-Spanking-t}}' } } } } } ); /* 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: '{{Sex toys}} {{Bondequip}} {{Basic terms}}', 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 ); } } ); }