MediaWiki:Common.js: различия между версиями
NoPH8 (обсуждение | вклад) | NoPH8 (обсуждение | вклад) | ||
Строка 11: | Строка 11: | ||
} | } | ||
if (wgAction == 'edit' || wgAction == 'submit') { | if (wgAction == 'edit' || wgAction == 'submit') { | ||
− | importScriptURI('/index.php?title=MediaWiki:Wikificator.js&action=raw&ctype=text/javascript') | + | importScriptURI('http://ru.wikipedia.org/w/index.php?title=MediaWiki:Wikificator.js&action=raw&ctype=text/javascript') |
addOnloadHook(addWikifButton) | addOnloadHook(addWikifButton) | ||
} | } |
Версия 08:07, 4 сентября 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) }