صارف:Yethrosh/insertVectorButtons.js
(صارف:محمد شعیب/insertVectorButtons.js سے رجوع مکرر)
آپ کی توجہ درکار ہے۔ اس صفحہ میں جو اسکرپٹ شامل ہیں، وہ صفحہ لوڈ ہونے پر ہر دفعہ چلیں گی۔ لہذا خراب، غلط اور نامناسب کوڈ یا اسکرپٹ یہاں درج نہ کریں۔ اس سے آپ کے کھاتے کو بھی خطرہ لاحق ہو سکتا ہے۔ |
یاددہانی: محفوظ کرنے کے بعد تازہ ترین تبدیلیوں کو دیکھنے کے لیے آپ کو اپنے براؤزر کا کیش صاف کرنا ہوگا۔
- فائرفاکس/ سفاری: جب Reload پر کلک کریں تو Shift دبا کر رکھیں، یا Ctrl-F5 یا Ctrl-R دبائیں (Mac پر R- )
- گوگل کروم: Ctrl-Shift-R دبائیں (Mac پر Shift-R-⌘)
- انٹرنیٹ ایکسپلورر: جب Refresh پر کلک کریں تو Ctrl یا Ctrl-F5 دبائیں
- اوپیرا: Tools → Preferences میں جائیں اور کیش صاف کریں
اس اسکرپٹ کی دستاویزی تفصیلات صارف:Yethrosh/insertVectorButtons پر درج کی جا سکتی ہیں۔ |
/**
* Insert Vector Buttons
* Created on April 6th, 2010
*
* @revision 2014-06-50
* @source meta.wikimedia.org/wiki/User:Krinkle/Scripts/insertVectorButtons
*
* Thi script is released in the public domain.
*/
if ( $.fn.wikiEditor && typeof kCustomMainInsertButton === 'undefined' && ( wgAction == 'edit' || wgAction == 'submit' ) ) {
window.kCustomMainInsertButton = function (imageId, imageFile, speedTip, tagOpen, tagClose, sampleText, callbackFunc) {
// Reason for the a[b]-method instead of the much shorter a.b-method
// is to dynamicly set the object name imageId
var wikiOptions = {'section': 'main', 'group': 'insert', 'tools': {}};
wikiOptions.tools[imageId] = {
label: speedTip,
type: 'button',
icon: imageFile,
action: {
type: 'callback',
execute: function () {
$('#wpTextbox1').textSelection('encapsulateSelection',{
pre: tagOpen,
peri: sampleText,
post: tagClose
});
if (callbackFunc) { callbackFunc(); }
}
}
};
$('#wpTextbox1').wikiEditor('addToToolbar', wikiOptions);
};
jQuery(function () {
if (typeof kCustomMainInsertButton_config !== 'undefined') {
kCustomMainInsertButton_config();
}
});
} else {
window.kCustomMainInsertButton = function () {};
}