User talk:Robinr78/common.js: Difference between revisions

From Robin's SM-201 Website
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<pre>
<pre>
var customizeToolbar = function () {
var customizeToolbar = function () {
 
/* stable as of 2019-1014-1251 */
/* Stable as of 2019-1012-0820 */
 
<pre>
 
var customizeToolbar = function () {
 
/* ======================================Add SM-201 & category Sections */
/* ======================================Add SM-201 & category Sections */


Line 128: Line 122:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: "{{Header}}<br>",
pre: "{{Header}} ",
                                         post:"{{Footer}}<br>"
                                         post:"{{Footer}} "
}
}
}
}
Line 149: Line 143:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: "{{Bioheader}}<br>",
pre: "{{Bioheader}}",
                                         post:"{{Biofooter}}<br>"
                                         post:"{{Biofooter}}"
}
}
}
}
Line 584: Line 578:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre:  '[[Category:Artist]] [[Category:Art forms]]',
pre:  '[[Category:Artists]] [[Category:Art forms]]',
post: ''
post: ''
}
}
Line 599: Line 593:
tools: {
tools: {
"Cats": {
"Cats": {
label: 'Author',
label: 'Authors',
type: 'button',
type: 'button',
icon: 'http://www.sm-201.org/a/images/1/15/Button-quil.png',
icon: 'http://www.sm-201.org/a/images/1/15/Button-quil.png',
Line 605: Line 599:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre:  '[[Category:Author]]',
pre:  '[[Category:Authors]]',
post: ''
post: ''
}
}
Line 725: Line 719:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre:  '{{cat2|Director articles | Producer articles}} '
pre:  '{{cat2|Directors | Producers}} '
/* post: '' */
/* post: '' */
}
}
Line 787: Line 781:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre:  '[[Category:Filmography articles]]',
pre:  '[[Category:Filmography]]',
post: ''
post: ''
}
}
Line 814: Line 808:
}
}
} );
} );
/* 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:  '[[Category:History]]',
post: ''
}
}
}
}
} );


/* Toolbar Icon category Button  */
/* Toolbar Icon category Button  */
Line 827: Line 842:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre:  '[[Category:Icon]]',
pre:  '[[Category:Icons]] [[Category:Index]]',
post: ''
post: ''
}
}
Line 848: Line 863:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre:  '[[Category:Link]]',
pre:  '[[Category:Links]]',
post: '[[Category:Lists]]'
post: '[[Category:Lists]]'
}
}
Line 869: Line 884:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre:  '[[Category:Magazine]][[Category:Bondage magazine]][[Category:Fetish magazine]]',
pre:  '[[Category:Magazines]][[Category:Bondage magazines]][[Category:Fetish magazines]]',
post: ''
post: ''
}
}
Line 890: Line 905:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre:  '{{cat3|Bondage model|Fetish model|Pinup model}}',
pre:  '{{cat3|Bondage models|Fetish models|Pinup models}}',
post: ''
post: ''
}
}
Line 933: Line 948:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre:  '[[Bondage photographer]] [[Fetish photographer]]',
pre:  '[[Bondage photographers]] [[Fetish photographers]]',
post: '[[Pinup photographer]]'  
post: '[[Pinup photographers]]'  
}
}
}
}
Line 949: Line 964:
label: 'Places',
label: 'Places',
type: 'button',
type: 'button',
icon: 'http://www.sm-201.org/a/images//bf/Editor_p.jpg',
  icon: 'http://www.sm-201.org/a/images/b/bf/Editor_p.png',
 
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',
Line 961: Line 977:
} );
} );


/* 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:  '[[Category:Spiderpool]]',
post: ''
}
}
}
}
} );




Line 977: Line 1,014:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: '{{cat3|Professional Dom|Professional Sub| Prodom venue}}',
pre: '{{cat3|Professional Doms|Professional Subs| Prodom venues}}',
post: ''
post: ''
}
}
Line 1,106: Line 1,143:
} );
} );
}
}


</pre>
</pre>

Revision as of 19:51, 14 October 2019

var customizeToolbar = function () {
/* stable as of 2019-1014-1251 */
/* ======================================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}} ",
                                        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 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:Artists]] [[Category:Art forms]]',
					post: ''
				}
			}
		}
	}
} );


/* 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:  '[[Category:Authors]]',
					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|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:  '[[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]]',
					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 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:  '[[Category: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:  '[[Category:Icons]] [[Category:Index]]',
					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:Links]]',
					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:Magazines]][[Category:Bondage magazines]][[Category:Fetish magazines]]',
					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 models|Fetish models|Pinup models}}',
					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 photographers]] [[Fetish photographers]]',
post: '[[Pinup photographers]]' 
				}
			}
		}
	}
} );

/* 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:  '[[Category:Places]] [[Cateory: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:  '[[Category: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: '{{cat3|Professional Doms|Professional Subs| Prodom venues}}',
					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 );
		}
	} );
}