MediaWiki:Common.js

Материал из Linuxformat.

(Различия между версиями)
Перейти к: навигация, поиск
м
м
 
Строка 12: Строка 12:
if (mwCustomEditButtons) {
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
mwCustomEditButtons[mwCustomEditButtons.length] = {
-
"imageFile": "/skins/common/images/button_insert table.png",
+
"imageFile": "/skins/common/images/button_insert_table.png",
"speedTip": "Insert table (3 by 3)",
"speedTip": "Insert table (3 by 3)",
"tagOpen": "{|",
"tagOpen": "{|",

Текущая версия

/* Размещённый здесь код JavaScript будет загружен всем пользователям при обращении к какой-либо странице */

var auto_comment = 0;

if (document.URL.indexOf('action=edit') > 0 || document.URL.indexOf('action=submit') > 0) {

      if (wgCanonicalNamespace != 'Special') {
              document.write('<script type="text/javascript" src="http://ru.wikipedia.org/w/index.php' +
              '?title=MediaWiki:Onlyifediting.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
      }

}

if (mwCustomEditButtons) {

  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "/skins/common/images/button_insert_table.png",
    "speedTip": "Insert table (3 by 3)",
    "tagOpen": "{|",
    "tagClose": "|}",
    "sampleText": "class=wikitable border=1 cellpadding=5\

|+ table name\ |-\ ! header 1\ ! header 2\ ! header 3\ |-\ | row 1, cell 1\ | row 1, cell 2\ | row 1, cell 3\ |-\ | row 2, cell 1\ | row 2, cell 2\ | row 2, cell 3\ |-"}

 }
Личные инструменты
  • Купить электронную версию
  • Подписаться на бумажную версию