User talk:Robinr78/common.js

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

User:Robinr78/common.js

https://commons.wikimedia.org/wiki/WikiEditor_Toolbar_Icons


var customizeToolbar = function () {

/* Add { {footers}} group =============================*/

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	'sections': {
		'SM-201': {
			'type': 'toolbar', // Can also be 'booklet'
			'label': 'SM-201'
			// or 'labelMsg': 'section-emoticons-label' for a localized label
		}
	}
} );

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	'section': 'SM-201',
	'groups': {
		'Format': {
			'label': 'Format' // or use labelMsg for a localized label, see above
		}
	}
} );

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	'section': 'SM-201',
	'groups': {
		'Footers': {
			'label': 'Footers' // or use labelMsg for a localized label, see above
		}
	}
} );


/* ===================================================== */

/* Add { {Biofooters}} */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Footers',
	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: 'Footers',
	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}}",
                                        post: "{ {Historyfooter}}"
				}
			}
		}
	}
});

/* Add { {Libfooter}} */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Footers',
	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}}",
                                        post: "{ {Libfooter}}"
				}
			}
		}
	}
});

/* Add { {Lifefooter}} */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Footers',
	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}}",
                                        post: "{ {Lifefooter}}"
				}
			}
		}
	}
});


/* Add { {Macrofooter}} */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Footers',
	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: 'Footers',
	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: 'Footers',
	tools: {
		"Robins Personal memories": {
			label: 'Robin Mem',
			type: 'button',
  icon: 'http://www.sm-201.org/a/images/d/d5/Editor_r.png',
			action: {
				type: 'encapsulate',
				options: {
					pre:  "{ {Pmheader}}",
                                        post: "{ {Pmfooter}}"
				}
			}
		}
	}
});

/* Add { {Storyfooters}} */
$('#wpTextbox1').wikiEditor('addToToolbar', {
	section: 'SM-201',
	group: 'Footers',
	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: 'Footers',
	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 [[ ]] 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 {{ }} 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: {
		"Quotes": {
			label: 'Quotes',
			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>',
				}
			}
		}
	}
});

};

/* 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 );
		}
	} );
}


eb Button_@.png
9e Button_$.png
d0 Button_Base.png
e0 Button_book.png
01 Button_cal.jpg
d0 Button_Cat.png
5f Button_center.png
22 Button_copy.jpg
c7 Button_cr.png
02 Button_dot.jpg
13 Button_Gall.png
90 Button_eq.jpg
1b Button_in.jpg
0f Button_Just.png
c0 Button_Link.png
ad Button_mt.jpg
1b Button_no.jpg
49 Button_%28_%29.jpg
a6 Button_quiet.jpg
7d Button_Quot.png
6d Button_Sig.png
c9 Button_Strike.png
5f Button_Temp.png
c0 Editor_A.png
39 Editor_apos.png
b4 Editor_B.png
be Editor_C.png
f1 Editor_Cats.png
18 Editor_D.png
e3 Editor_E.png
31 Editor_F.png
35 Editor_G.png
e4 Editor_H.png
5e Editor_I.png
fd Editor_J.png
5d Editor_K.png
16 Editor_L.png
fb Editor_Lgnd.png
02 Editor_Link.png
6d Editor_M.png
fc Editor_Mac.png
95 Editor_Mic.png
0e Editor_N.png
36 Editor_O.png
bf Editor_P.png
6a Editor_Pipe.png
6f Editor_Pre.png
35 Editor_Q.png
48 Editor_Quot.png
d5 Editor_R.png
66 Editor_Refs.png
60 Editor_S.png
84 Editor_Strike.png
19 Editor_T.png
42 Editor_U.png
73 Editor_Ul.png
c2 Editor_V.png
ff Editor_W.png
ad Editor_X.png
f1 Editor_Y.png
c5 Editor_Z.png
66 Editor-!.png
5a Editor-ques.png
e0 Editor_book.png
3a Editor-Flame.png
66 Editor_!.png
5a Editor_ques.png
9f cat-ballet
67 cat-class
37 cat-club
0d cat-corset
96 cat-event
bd cat-film
4a cat-meg
ea cat-model
e8 cat-photo
a8 cat-pro 99 cat-spank
bc Cat-spider.jpg
25 cat-TV
23 Circle_a
b2 Circle_b
66 Circle_c
af Circle_d
b8 Circle_e
0f Circle_f
b6 Circle_g
f7 Circle_h
14 Circle_i
66 Circle_j


Headers/Footers

F Plain footer H History Book Library Life lessons Macropeedia Micropedia Personal history Stories Time line

Categories

A - Human Anatomy B - Books C - Classes C - Club history E - Events F - Film I - Icons N - Info box L - Links M - Magazines P - Places S - Sessions R - Stories by Robin T - Toys

Templates

Paraphilias sa-clothing

  • http:/ /www.sm-201.org/a/images/