MediaWiki:Gadget-RegexMenuFramework.js
Appearance
![]() | This page is loaded as a part of the RegexMenuFramework gadget, a hidden gadget. |
/* Script: [[m:User:Pathoschild/Scripts/Regex menu framework]]
* RegexMenuFramework: creates a sidebar menu of user-defined regex tools
* Documentation: [[m:User:Pathoschild/Scripts/Regex menu framework]]
* Written by: Pathoschild
*
<source lang="javascript"><nowiki>
*/
// load script
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Pathoschild/Scripts/Regex_menu_framework.js&action=raw&ctype=text/javascript');
// Add deprecation logging. Eventually move this into the meta script
var regexlib = {
regexTool: window.regexTool,
regsearch: window.regsearch,
regex: window.regex,
setreason: window.setreason,
setoptions: window.setoptions,
doaction: window.doaction,
custom: window.custom,
rfmenu: window.rfmenu
};
mw.log.deprecate( window, 'regexTool', regexLib.regexTool, 'RegexMenuFramework is deprecated, use Templates [[:mw:TemplateScript]] instead', 'userscript-regexf-regexTool' );
mw.log.deprecate( window, 'regsearch', regexLib.regsearch, 'RegexMenuFramework is deprecated, use Templates [[:mw:TemplateScript]] instead', 'userscript-regexf-regsearch' );
mw.log.deprecate( window, 'regex', regexLib.regex, 'RegexMenuFramework is deprecated, use Templates [[:mw:TemplateScript]] instead', 'userscript-regexf-regex' );
mw.log.deprecate( window, 'setreason', regexLib.setreason, 'RegexMenuFramework is deprecated, use Templates [[:mw:TemplateScript]] instead', 'userscript-regexf-setreason' );
mw.log.deprecate( window, 'setoptions', regexLib.setoptions, 'RegexMenuFramework is deprecated, use Templates [[:mw:TemplateScript]] instead', 'userscript-regexf-setoptions' );
mw.log.deprecate( window, 'doaction', regexLib.doaction, 'RegexMenuFramework is deprecated, use Templates [[:mw:TemplateScript]] instead', 'userscript-regexf-doaction' );
mw.log.deprecate( window, 'custom', regexLib.custom, 'RegexMenuFramework is deprecated, use Templates [[:mw:TemplateScript]] instead', 'userscript-regexf-custom' );
mw.log.deprecate( window, 'rfmenu', regexLib.rfmenu, 'RegexMenuFramework is deprecated, use Templates [[:mw:TemplateScript]] instead', 'userscript-regexf-rfmenu' );
// default menu links
function gadget_rmflinks() {
regexTool('Custom regex','custom()'); // a default tool which performs regex input in a dynamic form
}
/* </nowiki></source> */