Naudotojas:Vpovilaitis/Regex menu framework.js
Dėmesio: Išsaugojus jums gali prireikti išvalyti jūsų naršyklės podėlį, kad pamatytumėte pokyčius.
- Firefox / Safari: Laikydami Shift pasirinkite Perkrauti, arba paspauskite Ctrl-F5 ar Ctrl-R (sistemoje Apple Mac ⌘-R)
- Google Chrome: Spauskite Ctrl-Shift-R (sistemoje Apple Mac ⌘-Shift-R)
- Internet Explorer / Edge: Laikydami Ctrl paspauskite Naujinti, arba paspauskite Ctrl-F5
- Opera: Eikite į Meniu → Nuostatos (sistemoje Apple Mac Opera → Nustatymai), tuomet Privatumas ir sauga → išvalyti naršymo podėlį → išsaugotos talpyklos vaizdai ir failai.
/*************
*** Regex menu framework
*** by [[m:user:Pathoschild]] <http://meta.wikimedia.org/wiki/User:Pathoschild/Scripts/Regex_menu_framework>
*** - adds a sidebar menu of user-defined scripts.
************
if (document.URL.indexOf("action=edit") > 0 || document.URL.indexOf("action=submit") > 0) {
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:Pathoschild/Scripts/Regex_menu_framework.js&action=raw&ctype=text/javascript');
}
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:Pathoschild/Scripts/Regex_menu_framework.js&action=raw&ctype=text/javascript');
*/
/* menu links */
// In the function below, add more lines like "regexTool('link text','function_name()')" to add
// links to the sidebar menu. The function name is the function defined in rfmscripts() below.
function rmflinks() {
regexTool('Naudotojo regex','custom()'); // a default tool which performs regex input in a dynamic form
regexTool('Patikrinti','Patikrinti()');
}
function Patikrinti() {
regex(/\r?\n\{\{patikrinti\}\}/mg, '');
setreason('Patikrinta','append');
setoptions('true','true')
doaction('save');
}