ผลต่างระหว่างรุ่นของ "ผู้ใช้:ZilentFyld/Zilentscriptwp.js"

เนื้อหาที่ลบ เนื้อหาที่เพิ่ม
ZilentFyld (คุย | ส่วนร่วม)
ไม่มีความย่อการแก้ไข
ZilentFyld (คุย | ส่วนร่วม)
ไม่มีความย่อการแก้ไข
บรรทัด 269:
}
}
},
} 'dictionarytab':{
} 'label':'แท็บ',
} 'tools':{
'smilewiktblock': {
});
typelabel: 'buttonกล่อง wikt',
$('#wpTextbox1').wikiEditor('addToToolbar', {
type: 'button',
'section': 'otherscript',
}); action: {
'group': 'dateformat',
}); type:'callback',
'tools': {
'dates': execute:function(){
} blockSwitch('#enwiktblock');
label: 'วันที่จากอัง-ไทย',
type: 'button', }
}
icon: commonsUrl + '/thumb/3/34/US_to_Thai_date_format_with_BE.svg/37px-US_to_Thai_date_format_with_BE.svg.png',
action: { }
type: 'replace',
options: {
regex: /^(.*?)$/g,
regexReplace: function (match) {
var exp = match;
exp = exp.replace(/([0-9]+) ([A-z]+) (|[1-2])(|[0-9])(|[0-9])([0-9])/g, function (match, d, m, y) {
return d + ' ' + thmonth[m] + ' พ.ศ.' + (parseInt(y) + 543);
});
exp = exp.replace(/([A-z]+) ([0-9]+), ([0-9]+)/g, function (match, m, d, y) {
return d + ' ' + thmonth[m] + ' พ.ศ.' + (parseInt(y) + 543);
});
return exp;
}
}
}
},
'dateces': {
label: 'วันที่จากอัง-ไทยมี ค.ศ.',
type: 'button',
icon: commonsUrl + '/thumb/9/9c/US_to_Thai_date_format_with_CE.svg/37px-US_to_Thai_date_format_with_CE.svg.png',
action: {
type: 'replace',
options: {
regex: /^(.*?)$/g,
regexReplace: function (match) {
var exp = match;
exp = exp.replace(/([0-9]+) ([A-z]+) (|[1-2])(|[0-9])(|[0-9])([0-9])/g, function (match, d, m, y) {
return d + ' ' + thmonth[m] + ' ค.ศ. ' + (parseInt(y));
});
exp = exp.replace(/([A-z]+) ([0-9]+), ([0-9]+)/g, function (match, m, d, y) {
return d + ' ' + thmonth[m] + ' ค.ศ. ' + (parseInt(y));
});
return exp;
}
}
}
},
'years': {
label: 'คศ-พศ',
type: 'button',
icon: commonsUrl + '/thumb/c/ca/Calendar_icon_2.svg/22px-Calendar_icon_2.svg.png',
action: {
type: 'replace',
options: {
regex: /([0-9]+)/g,
regexReplace: function (match, y) {
return 'พ.ศ. ' + (parseInt(y) + 543);
}
}
}
}
}
});
//test
$('#wpTextbox1').wikiEditor('addToToolbar', {
'sections': {
'emoticons': {
'type': 'toolbar', // Can also be 'booklet'
'label': 'Emoticons',
'groups': {
'faces': {
'label': 'Faces',
'tools': {
'smile': {
label: 'Smile!', // or use labelMsg for a localized label, see above
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png',
}
}
},
}
}