MediaWiki:Editpage.js
Заўвага: Пасля апублікавання, вам можа спатрэбіцца ачыстка кэшу браўзера, каб убачыць унесеныя змены.
- Firefox / Safari: націсніце Reload, утрымліваючы Shift, або націсніце Ctrl-F5 ці Ctrl-R (⌘-R на Макінтошах)
- Google Chrome: Націсніце Ctrl-Shift-R (⌘-Shift-R на Mac)
- Internet Explorer / Edge: націсніце Refresh, утрымліваючы Ctrl, або націсніце Ctrl-F5
- Opera: Увайдзіце Menu → Settings (Opera → Preferences на Mac), далей Privacy & security → Clear browsing data → Cached images and files.
importScript('MediaWiki:Wikificator.js')
// Служебная функция, добавлет к тулбару кнопку спереди
function addFuncButton(img, tip, func){
var toolbar = document.getElementById('toolbar')
if (!toolbar) return
var i=document.createElement('img')
i.src=img; i.alt=tip; i.title=tip; i.onclick=func; i.style.cursor='pointer'
toolbar.appendChild(i)
}
// Toolbar buttons
// Вікіфікатар
$(function(){
addFuncButton("//upload.wikimedia.org/wikipedia/commons/3/38/Button_wikify.png", 'Вікіфікатар', function(){Wikify()})
});