মিডিয়াউইকি:Gadget-button-section.js
টীকা: সংরক্ষণ করার পর, পরিবর্তনসমূহ তৎক্ষণাৎ নাও দেখাতে পারে। আপনার ব্রাউজারের ক্যাশ কিভাবে এড়াবেন তা জানতে এখানে ক্লিক করুন।
- ফায়ারফক্স / সাফারি: Shift ধরে রাখা অবস্থায়পুনঃলোড করুন-এ ক্লিক করুন, অথবা Ctrl-F5 বা Ctrl-R (ম্যাক-এ ⌘-R) চাপুন
- গুগল ক্রোম: Ctrl-Shift-R (ম্যাক-এ ⌘-Shift-R) চাপুন
- ইন্টারনেট এক্সপ্লোরার: Ctrl ধরে রাখা অবস্থায় Refresh-এ ক্লিক করুন, অথবা Ctrl-F5 চাপুন
- অপেরা: মেনু → ব্যবস্থাপনাসমূহ-এ যান (ম্যাকে অপেরা → পছন্দসমূহ) এবং এরপর গোপনীয়তা ও সুরক্ষা → ব্রাউজিং-এর তথ্য পরিষ্কার করুন → ক্যাশে করা ছবি ও ফাইলগুলি।
অন্যান্য ব্রাউজার সম্পর্কে বিশদ নির্দেশাবলীর জন্য, উইকিপিডিয়া:আপনার ক্যাশে বাইপাস করুন দেখুন।
function getProssimoNumero() {
nextNum = 1;
prefix = '';
sectionPresenti = $('#wpTextbox1').val().match(/<section\s+begin\=[\"]?[a-zA-Z]*(\d+)[\"]?\s*\/>/gi);
if (sectionPresenti !== null) {
for (i = 0; i < sectionPresenti.length; i++) {
thisNum = parseInt(sectionPresenti[i].replace(/<section\s+begin\=[\"]?[a-zA-Z]*(\d+)[\"]?\s*\/>/, '$1'));
if (thisNum >= nextNum) {
nextNum = thisNum + 1;
prefix = sectionPresenti[i].replace(/<section\s+begin\=[\"]?([a-zA-Z]*)\d+[\"]?\s*\/>/, '$1');
}
}
}
return prefix + nextNum;
}
function marcaSection() {
name = prompt("আপনি এই অনুচ্ছেদের কি নাম দিতে চান?", getProssimoNumero());
if (name !== null) {
textArea = $('#wpTextbox1');
start = textArea[0].selectionStart;
end = textArea[0].selectionEnd;
selectedText = textArea.val().substring(start, end);
replacement = '<section begin="' + name + '" />' + selectedText + '<section end="'+ name + '" />';
textArea.val(textArea.val().substring(0, start) + replacement + textArea.val().substring(end));
}
}
if ( typeof $ != 'undefined' && typeof $.fn.wikiEditor != 'undefined' ) {$( function() {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'advanced',
'group': 'format',
'tools': {'section': {
label: 'নির্বাচিত অনুচ্ছেদের জন্য section ট্যাগ যোগ করবে',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/4/44/Button_comillas_latinas.png',
action: {type: 'callback',
execute: function(context){marcaSection();} }
}}});});}