User:Robinr57/common.js

From Robin's SM-201 Website
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
var customizeToolbar = function () {
/* stable as of 2020-0218 */

/*  Enable section:SM-201 */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	'sections': {
		'SM-201': {
			'type': 'toolbar', // Can also be 'booklet'
			'label': 'SM-201'
	}
	}
} );

/* Enable section:Other */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
   'sections': {
		'Other': {
			'type': 'toolbar', // Can also be 'booklet'
			'label': 'Other'
	}
	}
} );



/* Enable Group:Format: */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	'groups': {
		'Format': {
			'label': 'Format' 
		}
	}
} );

/* --- Enable Format:Comment */

$( '#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: ' -->'
				}
			}
		}
	}
} );

/* --- Enable Format:Apostrophe */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	group: 'Format',
	tools: {
		"Apostrope": {
			label: 'Apostrophe',
			type: 'button',
icon: 'http://www.sm-201.org/a/images/3/39/Editor_apos.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  "'",
					post: "'"
				}
			}
		}
	}
} );

/* --- Enable Format:<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: '' 
				}
			}
		}
	}
});

/* --- Enable Format:List Item */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Format',
	tools: {
		"Item2": {
			label: 'Item2',
			type: 'button',
icon: 'http://sm-201.org/a/images/7/79/Button_item.jpg',
			action: {
				type: 'encapsulate',
				options: {
					pre: '* [[',
					post: ']]' 
				}
			}
		}
	}
});

/* --- Enable Format:Template Item */
$('#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: ']]' 
				}
			}
		}
	}
});

/* --- Enable Format:Tempate:BC */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Format',
	tools: {
		"{{bc": {
			label: '{{bc',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/b/b4/Editor_b.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{bc|",
                                        post:"}}"
				}
			}
		}
	}
});

/* --- Enable Format:Book title */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Format',
	tools: {
		"{{Titles": {
			label: 'Titles',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/f/f4/Button_ititle.jpg',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Titles|",
                                        post:"}}"
				}
			}
		}
	}
});

/* --- Enable Format:Book title */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Format',
	tools: {
		"Book link": {
			label: 'Book link',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/e/e0/Editor_book.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  '<I>[[',
                                        post: ']]</I>'
				}
			}
		}
	}
});

/* --- Enable Format:Book title */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Format',
	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>'
				}
			}
		}
	}
});

/* --- Enable button Other:Also:Movies */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Format',
	tools: {
		"Movies": {
			label: 'Movies',
			type: 'button',
      icon: 'http://www.sm-201.org/a/images/6/6d/Editor_m_.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Movies",
                    post:"}}"
				}
			}
		}
	}
});

/* --- Enable Format:Underline */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Format',
	tools: {
		"Underline": {
			label: 'Underline',
			type: 'button',
icon: 'http://www.sm-201.org/a/images/7/73/Editor_ul.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  "<u>",
					post: "</u>",
				}
			}
		}
	}
});

/* --- Enable Format: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>',
				}
			}
		}
	}
});

/* --- Enable Format:button [[link]] */
$( '#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: ']]'
				}
			}
		}
	}
} );

/* --- Enable Format: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: "}}"
				}
			}
		}
	}
} );

/* --- Enable Format:button 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: '"',
				}
			}
		}
	}
});

/* --- Enable Format:button moz-column */
$('#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>",
				}
			}
		}
	}
});

/* --- Enable Format:button 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>',
				}
			}
		}
	}
});

/* --- Enable Format:button 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>',
				}
			}
		}
	}
});

/* Enable Group:Inc:  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	'groups': {
		'Inc': {
			'label': 'Inc' 
		}
	}
} );

/* --- Enable button Inc:Includeonly */
$('#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>"
				}
			}
		}
	}
});

/* --- Enable button Inc:Noinclude */
$('#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>"
				}
			}
		}
	}
});

/* --- Enable button Inc:Nowiki */
$('#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: "<nowiki>",
                                        post:"</nowiki>"
				}
			}
		}
	}
});

/* Enable group:Notes: */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
    section: 'SM-201',
	'groups': {
		'Refs': {
			'label': 'Refs' 
		}
	}
} );


/* --- Enable button Refs:<ref> */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"Ref": {
			label: 'RefLink',
			type: 'button',
      icon: 'http://www.sm-201.org/a/images/7/79/Button_reflink.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "<ref>",
                                        post:"</ref>"
				}
			}
		}
	}
});

/* --- Enable button Refs:<ref> */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"Note": {
			label: 'Note',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/0/0e/Editor_n.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: '<ref group="Note">',
                    post:"</ref>"
				}
			}
		}
	}
});

/* --- Enable button Refs:<src> */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"Src": {
			label: 'Src',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/6/60/Editor_s.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<ref group="Source">',
                    post:"</ref>"
				}
			}
		}
	}
});

/* --- Enable button Refs:<Buy> */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"BuyIt": {
			label: 'BuyIt',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/b/b4/Editor_b.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<ref group="BuyIt">',
                    post:"</ref>"
				}
			}
		}
	}
});

/* --- Enable button Notes:Calendar  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"Access": {
			label: 'Access',
			type: 'button',
icon: 'http://www.sm-201.org/a/images/a/a7/Button_cal.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  "accessed = ",
					post: ""
				}
			}
		}
	}
} );

/* --- Enable button Refs:<backup> */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"!201": {
			label: '!201',
			type: 'button',
icon: 'http://www.sm-201.org/a/images/6/66/Editor_!.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '<ref group="Source">[[!Sm-201 2017-0316]]',
                    post:" backup</ref>"
				}
			}
		}
	}
});

/* --- Enable button Refs:<reflist> */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"Ref": {
			label: 'RefList',
			type: 'button',
      icon: 'http://www.sm-201.org/a/images/3/32/Button_reflist.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "== References ==",
                                        post:"<References />"
				}
			}
		}
	}
});

/* --- Enable button Refs:<reflist> */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"Note": {
			label: 'Note',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/0/0e/Editor_n.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '== Notes ==',
                                        post:'<references group="Note" />'
				}
			}
		}
	}
});

/* --- Enable button Refs:<reflist> */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"Ref": {
			label: 'SrcList',
			type: 'button',
 icon: 'http://www.sm-201.org/a/images/6/60/Editor_s.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '== Sources ==',
                                        post:'<references group="Source" />'
				}
			}
		}
	}
});

/* --- Enable button Refs:<Buy> */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"Ref": {
			label: 'BuyIt',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/b/b4/Editor_b.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '==Buy this book ==',
                    post:'<references group="BuyIt" />'
				}
			}
		}
	}
});

/* --- Enable button model */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"mg": {
			label: 'mg',
			type: 'button',
      icon: 'http://www.sm-201.org/a/images/6/6d/Editor_m_.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{mg|",
                    post:"}}"
				}
			}
		}
	}
});


/* --- Enable button Notes:@wr */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Refs',
	tools: {
		"Needs": {
			label: '{wref"}',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/e/eb/Button_@.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: '{{wref"|',
                    post:"}}"
				}
			}
		}
	}
});

/* Enable Group:Table */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	'groups': {
		'Table': {
			'label': 'Table' 
		}
	}
} );

/* --- Enable Table:Line1*/
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Table',
	tools: {
		"Line1": {
			label: 'Line1',
			type: 'button',
icon: 'http://www.sm-201.org/a/images/7/74/Button_L1.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  " {{Line1}}",
					post: ""
				}
			}
		}
	}
});

/* --- Enable Table:Line2*/
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Table',
	tools: {
		"Line2": {
			label: 'Line2',
			type: 'button',
icon: 'http://www.sm-201.org/a/images/7/7d/Button_L2.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  " {{Line2}}",
					post: ""
				}
			}
		}
	}
});


/* --- Enable button Notes:toporn  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	group: 'Table',
	tools: {
		"Valign top": {
			label: '',
			type: 'button',
icon: 'http://sm-201.org/a/images/1/19/Editor_t.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  'valign="top"',
					post: ''
				}
			}
		}
	}
} );


/* --- Enable button !! - New column */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Table',
	tools: {
		"!!": {
			label: '!!',
			type: 'button',
icon: 'http://www.sm-201.org/a/images/b/b6/Button_%21%21.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: " || ",
                                        post:""
				}
			}
		}
	}
});




/* --- Enable button mt - MT coloumn */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Table',
	tools: {
		"MT": {
			label: 'MT',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/a/ad/Button_mt.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "|| &nbsp; ",
                    post:""
				}
			}
		}
	}
});

/* --- Enable Table:button moz-column */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Table',
	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>"
				}
			}
		}
	}
});

/* Enable group:Page: */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
    section: 'SM-201',
	'groups': {
		'Page': {
			'label': 'Page' 
		}
	}
} );

/* --- Enable button model */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Page',
	tools: {
		"Model": {
			label: 'Model',
			type: 'button',
      icon: 'http://www.sm-201.org/a/images/6/6d/Editor_m_.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Infobox model",
                                        post:""
				}
			}
		}
	}
});

/* --- Enable button Pornstud  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Page',
	tools: {
		"Pornstud": {
			label: 'Model',
			type: 'button',
      icon: 'http://www.sm-201.org/a/images/9/9f/Button_male.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Infobox pornstud",
                                        post:""
				}
			}
		}
	}
});

/* --- Enable Pornstar */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	group: 'Page',
	tools: {
		"Model": {
			label: 'Model',
			type: 'button',
icon: 'http://www.sm-201.org/a/images/e/ea/Cat-model.jpg',
			action: {
				type: 'encapsulate',
				options: {
	                                pre:  '{{Infobox pornstar',
					post: ''
				}
			}
		}
	}
} );

/* --- Enable button Notes:toporn  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	group: 'Page',
	tools: {
		"toporn": {
			label: '',
			type: 'button',
icon: 'http://sm-201.org/a/images/1/19/Editor_t.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  '{{toporn|add=} }',
					post: ''
				}
			}
		}
	}
} );


/* --- Enable button Notes:ok  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Page',
	tools: {
		"porn": {
			label: 'sa-porn',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/b/bf/Editor_p.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{sa-porn",
                    post:"}}"
				}
			}
		}
	}
});




/* Enable group:Notes: */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
    section: 'SM-201',
	'groups': {
		'Notes': {
			'label': 'Notes' 
		}
	}
} );

/* --- Enable button Notes:Category  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	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: ']]'
				}
			}
		}
	}
} );

/* --- Enable button Notes:Calendar  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	tools: {
		"mm/yr": {
			label: '04/21',
			type: 'button',
icon: 'http://www.sm-201.org/a/images/a/a7/Button_cal.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  "04/21",
					post: ""
				}
			}
		}
	}
} );

/* --- Enable button Notes:header  */
$('#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:"}}"
				}
			}
		}
	}
});

/* --- Enable button Notes:header| */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	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:" 04/21}}"
				}
			}
		}
	}
});


/* --- Enable button Notes:Defaultsort  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	tools: {
		"{DS}": {
			label: '(DS)',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/1/18/Editor_d.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{DEFAULTSORT:",
                                        post:"}}"
				}
			}
		}
	}
});

/* --- Enable button Notes:footer  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	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:"}}"
				}
			}
		}
	}
});

/* --- Enable button Notes:Category:needs */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	tools: {
		"Needs": {
			label: 'Notes',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/0/0e/Editor_n.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Needs",
                                        post:"}}"
				}
			}
		}
	}
});



/* --- Enable button Notes:Heads2  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	tools: {
		"A2": {
			label: 'Heads2',
			type: 'button',
icon: 'http://www.sm-201.org/a/images/e/e9/Button_headline2.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  '==',
					post: '=='
				}
			}
		}
	}
} );

/* --- Enable button Notes:Wiki:@  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	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:"|_}}"
				}
			}
		}
	}
});

/* --- Enable button Notes:Redirect */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	tools: {
		"Redirect": {
			label: 'Redirect',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/c/c8/Button_redirect.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "#REDIRECT [[",
                                        post:"]]"
				}
			}
		}
	}
});

/* --- Enable button Notes:SHP matrix */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	tools: {
		"SHP": {
			label: 'SHP',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/6/60/Editor_s.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{shp|rpm=|emh=|bah=|etv=|bur=|msh=|pin=|sph=|show=|eve=|wwii=|yank=}}",
                    post:""
				}
			}
		}
	}
});


/* --- Enable button Notes:insert image */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	tools: {
		"Needs": {
			label: 'image:',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/5/5e/Editor_i.png',
			action: {
				type: 'encapsulate',
				options: {
				    pre: "Image:",
                                    post:""
				}
			}
		}
	}
});


/* --- Enable button Notes:@wr */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Notes',
	tools: {
		"Needs": {
			label: '{wr}',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/e/eb/Button_@.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{@wr",
                    post:"}}"
				}
			}
		}
	}
});

/* Enable group:Links: */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	'groups': {
		'Links': {
			'label': 'Links' 
		}
	}
} );


/* --- Enable Links:External links*/
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Links',
	tools: {
		'External': {
			label: 'External',
			type: 'button',
icon: 'http://www.sm-201.org/a/images/e/e3/Editor_e.png',
			action: {
				type: 'encapsulate',
				options: {
		                pre: "== External links ==",
				post: '',
				}
			}
		}
	}
});





/* ---- Enable Links:Sanity */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Links',
	tools: {
		"Links": {
			label: 'Sanity',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/6/60/Editor_s.png',
			action: {
				type: 'encapsulate',
				options: {
		pre: "{{Sanity check|04/21|R/}}",
                post:""
				}
			}
		}
	}
});

/* ---- Enable Links:Site ok */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Links',
	tools: {
		"Links": {
			label: 'Link OK',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/f/f1/Editor_y.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Site-ok|04/21 R/}} ",
                    post:""
				}
			}
		}
	}
});

/* ---- Enable Links:Red */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Links',
	tools: {
		"Links": {
			label: 'Footer',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/0/0e/Editor_n.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Site-red|04/21 R/}} ",
                    post:""
				}
			}
		}
	}
});

/* --- Enable Links:Strike through*/
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Links',
	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>',
				}
			}
		}
	}
});

/* ---- Enable Links:<cr> */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Links',
	tools: {
		"Links": {
			label: '<cr>',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/c/c7/Button_cr.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "<br>",
                    post:""
				}
			}
		}
	}
});

/* Enable Group:Files:  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'SM-201',
	'groups': {
		'Files': {
			'label': 'Files' 
		}
	}
} );

/* --- Enable Files:Copyright unknown */
$( '#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: ''
				}
			}
		}
	}
} );

/* --- Enable Files:Mo/Yr */
$( '#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:  '04/2120',
					post: ''
				}
			}
		}
	}
} );

/* --- Enable Files:Thumbnail */
$( '#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|200px| ]]'
				}
			}
		}
	}
} );

/* --- Enable Files:Gallery */
$( '#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" caption=""> ',
					post: '</gallery>'
				}
			}
		}
	}
} );

/*  =========================================== Add "Other" Buttons==== */

/* Enable section:Categories */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'Cats',
	'groups': {
		'Cats': {
			'label': 'Cats'
		}
	}
} );


/* Enable group:Other: */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
    section: 'Other',
	'groups': {
		'Also': {
			'label': 'Also' 
		}
	}
} );

/* --- Enable button Cats:Also:Mast */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Also',
	tools: {
		"ASFR": {
			label: 'ASFR',
			type: 'button',
      icon: 'http://sm-201.org/a/images/e/e0/Editor_a.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Sex asfr",
                                        post:"}}"
				}
			}
		}
	}
});

/* --- Enable button Other:DS roles  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Also',
	tools: {
		"{DS}": {
			label: 'DS roles',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/1/18/Editor_d.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{DS roles",
                                        post:"}}"
				}
			}
		}
	}
});

/* --- Enable button Other:Also:Human sexuality */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Also',
	tools: {
		"Human": {
			label: 'Human',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/e/e4/Editor_h.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Human sex",
                                        post:"}}"
				}
			}
		}
	}
});

/* --- Enable button Other:DS roles  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Also',
	tools: {
		"ID": {
			label: 'Sex ids',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/5/5e/Editor_i.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Sex ids",
                                        post:"}}"
				}
			}
		}
	}
});

/* --- Enable button Other:Also:Sex Industry */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Also',
	tools: {
		"Industy": {
			label: 'Industry',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/9/9e/Button_$.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Sex Industry",
                                        post:"}}"
				}
			}
		}
	}
});


/* --- Enable button Other:Also:LGBT slang */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Also',
	tools: {
		"LGBT slang": {
			label: 'LGBT slang',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/1/16/Editor_l.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{LGBT slang",
                                        post:"}}"
				}
			}
		}
	}
});


/* --- Enable button Other:Also:Other */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Also',
	tools: {
		"sa-off": {
			label: 'sa-off',
			type: 'button',
      icon: 'http://www.sm-201.org/a/images/b/b6/Editor_o.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{sa-offenses",
                                        post:"}}"
				}
			}
		}
	}
});

/* ---- Enable Footers:Porn */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Also',
	tools: {
		"Porno": {
			label: 'Porno',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/b/bf/Editor_p.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  "{{Porno",
                                        post: "}}"
				}
			}
		}
	}
});


/* --- Enable button Other:Also:Relationship */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Also',
	tools: {
		"Relationship": {
			label: 'Relationship',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/d/d5/Editor_r.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Relationships",
                                        post:"}}"
				}
			}
		}
	}
});


/* --- Enable button Cats:Also:Sex terms */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Also',
	tools: {
		"Sexual terms": {
			label: 'Sexual terms',
			type: 'button',
      icon: 'http://sm-201.org/a/images/1/19/Editor_t.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Sexual terms",
                                        post:"}}"
				}
			}
		}
	}
});


/* --- Enable button Refs:<reflist> */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Also',
	tools: {
		"BDSM": {
			label: 'BDSM',
			type: 'button',
      icon: 'http://www.sm-201.org/a/images/3/32/Button_reflist.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Outline of BDSM",
                                        post:"}}"
				}
			}
		}
	}
});


/* Enable Group:Format: */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'Other',
	'groups': {
		'Tables': {
			'label': 'Table' 
		}
	}
} );


/* --- Enable button Expl */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Table',
	tools: {
		"Expl 1": {
			label: 'Expl 1 !',
			type: 'button',
      icon: 'http://sm-201.org/a/images/a/af/Button_%21.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{!",
                                        post:"}}"
				}
			}
		}
	}
});


/* --- Enable button Expl */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Table',
	tools: {
		"Expl 2": {
			label: 'Expl 1 !',
			type: 'button',
      icon: 'http://sm-201.org/a/images/b/b6/Button_%21%21.png', 
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{!!",
                                        post:"}}"
				}
			}
		}
	}
});

/* Enable group:Temps: */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
    section: 'Other',
	'groups': {
		'Temps': {
			'label': 'Temps' 
		}
	}
} );

/* --- Enable button BDSMAuthors  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Temps',
	tools: {
		"Auth": {
			label: 'Auth',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/b/b4/Editor_b.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{bdsmauthors",
                                        post:"}}"
				}
			}
		}
	}
});

/* --- Enable button {{Caning}}  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Temps',
	tools: {
		"Caning": {
			label: 'Caning',
			type: 'button',
     icon: 'http://sm-201.org/a/images/b/be/Editor_c.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{Caning",
                                        post:"}}"
				}
			}
		}
	}
});

/* --- Enable button sa-bondfurn  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Temps',
	tools: {
		"Furn": {
			label: 'Furn',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/3/31/Editor_f.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{sa-bondfurn",
                                        post:"}}"
				}
			}
		}
	}
});

/* --- Enable button sa-bondpos  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Temps',
	tools: {
		"Pos": {
			label: 'Pos',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/b/bf/Editor_p.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{sa-bondpos",
                                        post:"}}"
				}
			}
		}
	}
});

/* --- Enable button sa-bondrest  */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'Other',
	group: 'Temps',
	tools: {
		"Rest": {
			label: 'Rest',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/d/d5/Editor_r.png',
			action: {
				type: 'encapsulate',
				options: {
					pre: "{{sa-bondrest",
                                        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 );
		}
	} );
}