MediaWiki:Common.js — различия между версиями
Материал из Википедия «Русские Эмираты»
Emirates (обсуждение | вклад) (Новая страница: «function addWikifButton() { var toolbar = document.getElementById('toolbar') if (!toolbar) return var i = document.createElement('img') ...») |
Emirates (обсуждение | вклад) |
||
Строка 9: | Строка 9: | ||
toolbar.appendChild(i) | toolbar.appendChild(i) | ||
} | } | ||
− | if ( | + | if (wgAction == 'edit' || wgAction == 'submit') { |
− | + | importScriptURI('http://ru.wikipedia.org/w/index.php?title=MediaWiki:Wikificator.js&action=raw&ctype=text/javascript') | |
− | + | ||
addOnloadHook(addWikifButton) | addOnloadHook(addWikifButton) | ||
} | } |
Текущая версия на 15:26, 17 сентября 2011
function addWikifButton() {
var toolbar = document.getElementById('toolbar')
if (!toolbar) return
var i = document.createElement('img')
i.src = 'http://upload.wikimedia.org/wikisource/ru/d/d1/Button-wikifikator.png'
i.alt = i.title = 'викификатор'
i.onclick = Wikify
i.style.cursor = 'pointer'
toolbar.appendChild(i)
}
if (wgAction == 'edit' || wgAction == 'submit') {
importScriptURI('http://ru.wikipedia.org/w/index.php?title=MediaWiki:Wikificator.js&action=raw&ctype=text/javascript')
addOnloadHook(addWikifButton)
}