User:Ricordisamoa/emoticons/Gnome3.js
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.
/* <nowiki>
* Set of smilies from the GNOME 3 set
* [[commons:Category:GNOME Desktop icons, emotes]]
*/
$(function(){
if($('#wpTextbox1').length===0) return;
$('#wpTextbox1').wikiEditor('addToToolbar',{
'section': 'emoticons',
'groups': {
'smilies-Gnome3': {
'label': 'GNOME 3'
}
}
});
var emotigroup={
'section': 'emoticons',
'group': 'smilies-Gnome3',
'tools': {}
},
prefix='Gnome3-';
$.each(['angel','angry','cool','crying','devilish','embarrassed','glasses','kiss','laugh','plain','raspberry',
'sad','sick','smile-big','smile','smirk','surprise','tired','uncertain','wink','worried'],function(i,emoticon){
var ucFirst = emoticon.charAt( 0 ).toUpperCase() + emoticon.slice( 1 );
emotigroup.tools[ucFirst]={
label: ucFirst,
type: 'button',
icon: '//commons.wikimedia.org/wiki/Special:Filepath/'+mw.util.wikiUrlencode(prefix+emoticon+'.svg')+'?width=20px',
action: {
type: 'encapsulate',
options: {
pre: '[[File:'+prefix+emoticon+'.svg|20px]]',
post: ''
}
}
};
} );
$('#wpTextbox1').wikiEditor('addToToolbar',emotigroup);
});