MediaWiki:Common.js
Материал из ATR
(Различия между версиями)
(Новая: /* Размещённый здесь код JavaScript будет загружен всем пользователям при обращении к какой-либо странице *...) |
м |
||
Строка 20: | Строка 20: | ||
} | } | ||
+ | |||
+ | function includePage( name ) | ||
+ | { | ||
+ | document.write('<script type="text/javascript" src="' + wgScript + '?title=' | ||
+ | |||
+ | |||
+ | + name | ||
+ | |||
+ | + '&action=raw&ctype=text/javascript"><\/script>' | ||
+ | ); | ||
+ | } | ||
+ | /* End of includePage */ | ||
+ | |||
+ | |||
+ | /* Including extra .js pages ********************************************************* | ||
+ | */ | ||
+ | // switches for scripts | ||
+ | // TODO: migrate to JSConfig | ||
+ | // var load_extratabs = true; | ||
+ | var load_edittools = true; | ||
+ | |||
+ | // extra drop down menu on editing for adding special characters | ||
+ | includePage( 'MediaWiki:Edittools.js' ); | ||
+ | |||
+ | //Editpage scripts | ||
+ | if (wgAction=='edit' || wgAction == 'submit') | ||
+ | importScript('MediaWiki:Editpage.js') | ||
+ | |||
+ | /* End of extra pages */ |
Версия 15:54, 10 июля 2009
/* Размещённый здесь код JavaScript будет загружен всем пользователям при обращении к какой-либо странице */ /** Extra toolbar options ****************************************************** * * Description: UNDOCUMENTED * Maintainers: [[User:MarkS]]?, [[User:Voice of All]], [[User:R. Koot]] */ //This is a modified copy of a script by User:MarkS for extra features added by User:Voice of All. // This is based on the original code on Wikipedia:Tools/Editing tools // To disable this script, add <code>mwCustomEditButtons = [];<code> to [[Special:Mypage/monobook.js]] if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://www.koreanwikiproject.com/wiki/skins/common/images/Button_mp3.png", "speedTip": "Mp3", "tagOpen": "<flashmp3>filename.mp3|leftbg=003478|rightbg=c60c30|lefticon=ffffff|righticon=ffffff</flashmp3>", "tagClose": "", "sampleText": ""}; } function includePage( name ) { document.write('<script type="text/javascript" src="' + wgScript + '?title=' + name + '&action=raw&ctype=text/javascript"><\/script>' ); } /* End of includePage */ /* Including extra .js pages ********************************************************* */ // switches for scripts // TODO: migrate to JSConfig // var load_extratabs = true; var load_edittools = true; // extra drop down menu on editing for adding special characters includePage( 'MediaWiki:Edittools.js' ); //Editpage scripts if (wgAction=='edit' || wgAction == 'submit') importScript('MediaWiki:Editpage.js') /* End of extra pages */