مدیاویکی:Common.js: تفاوت بین نسخه‌ها

از دانشنامه‌ی اسلامی
پرش به ناوبری پرش به جستجو
سطر ۱: سطر ۱:
jQuery(document).ready(function ($) {
+
if (mwCustomEditButtons) {
        $('#wpTextbox1').wikiEditor('addToToolbar', {
+
  mwCustomEditButtons[mwCustomEditButtons.length] = {
                section: 'advanced',
+
    "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png",
                group: 'format',
+
    "speedTip": "Redirect",
                tools: {
+
    "tagOpen": "#REDIRECT [[",
                        buttonId: {
+
    "tagClose": "]]",
                                label: 'Comment visible only for editors',
+
    "sampleText": "Insert text"};
                                type: 'button',
+
                                icon: '//upload.wikimedia.org/wikipedia/commons/f/f9/Toolbaricon_regular_S_stroke.png',
+
  mwCustomEditButtons[mwCustomEditButtons.length] = {
                                action: {
+
    "imageFile": "http://images.wikia.com/central/images/c/c9/Button_strike.png",
                                        type: 'encapsulate',
+
    "speedTip": "Strike",
                                        options: {
+
    "tagOpen": "<s>",
                                                pre: "<!-- ",
+
    "tagClose": "</s>",
                                                peri: "Insert comment here",
+
    "sampleText": "Strike-through text"};
                                                post: " -->"
+
                                        }
+
  mwCustomEditButtons[mwCustomEditButtons.length] = {
                                }
+
    "imageFile": "http://images.wikia.com/central/images/1/13/Button_enter.png",
                        }
+
    "speedTip": "Line break",
                }
+
    "tagOpen": "<br />",
        });
+
    "tagClose": "",
});
+
    "sampleText": ""};
 +
 
 +
  mwCustomEditButtons[mwCustomEditButtons.length] = {
 +
    "imageFile": "http://images.wikia.com/central/images/7/74/Button_comment.png",
 +
    "speedTip": "Comment visible only for editors",
 +
    "tagOpen": "<!-- ",
 +
    "tagClose": " -->",
 +
    "sampleText": "Insert comment here"};
 +
 
 +
  mwCustomEditButtons[mwCustomEditButtons.length] = {
 +
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/2b/Button_ref_inscription.png",
 +
    "speedTip": "add ref tag for insert refrences",
 +
    "tagOpen": "<ref> ",
 +
    "tagClose": " </ref>",
 +
    "sampleText": "Insert refrence here"};
 +
  }

نسخهٔ ‏۲۴ ژوئیهٔ ۲۰۱۲، ساعت ۰۶:۱۸

if (mwCustomEditButtons) {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png",
     "speedTip": "Redirect",
     "tagOpen": "#REDIRECT [[",
     "tagClose": "]]",
     "sampleText": "Insert text"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/central/images/c/c9/Button_strike.png",
     "speedTip": "Strike",
     "tagOpen": "<s>",
     "tagClose": "</s>",
     "sampleText": "Strike-through text"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/central/images/1/13/Button_enter.png",
     "speedTip": "Line break",
     "tagOpen": "<br />",
     "tagClose": "",
     "sampleText": ""};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://images.wikia.com/central/images/7/74/Button_comment.png",
     "speedTip": "Comment visible only for editors",
     "tagOpen": "<!-- ",
     "tagClose": " -->",
     "sampleText": "Insert comment here"};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/2b/Button_ref_inscription.png",
     "speedTip": "add ref tag for insert refrences",
     "tagOpen": "<ref> ",
     "tagClose": " </ref>",
     "sampleText": "Insert refrence here"};
  }