User:Info-farmer/tamilProverbs.js
Jump to navigation
Jump to search
Note: After saving, changes may not occur immediately. Click here to learn how to bypass your browser's cache.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Cmd-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (Cmd-Shift-R on a Mac)
- Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Clear the cache in Tools → Preferences
For details and instructions about other browsers, see Wikipedia:Bypass your cache.
Code that you insert on this page could contain malicious content capable of compromising your account. If you are unsure whether code you are adding to this page is safe, you can ask at the central discussion page, Scriptorium. The code will be executed when previewing this page under some skins, including Monobook. You can in the interim if you wish to refresh the content sooner under another skin. |
Documentation for this script can be added at User:Info-farmer/tamilProverbs. |
/*
<source lang="javascript">
</source>
This scipt helps to replace/remove input data in the opened page and helps to edit quikly, regex editor and welcome inserter.
source:https://en.wikisource.org/wiki/User:Bodhisattwa/cleanup.js
* global $, mw, importScript, pathoschild
* TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
* @see https://meta.wikimedia.org/wiki/TemplateScript
* @update-token [[File:pathoschild/templatescript.js]]
*/
//set some global parameters for selection
var isPageNS = mw.config.get('wgNamespaceNumber') == 104;
$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function()
{
// page NS
pathoschild.TemplateScript.add(
[
{
name: '{{Tamil missing}}',
position: 'cursor',
script: function(editor) {
var header = editor.forField('#wpHeaderTextbox');
var footer = editor.forField('#wpFooterTextbox');
var isPageNS = mw.config.get('wgNamespaceNumber') == 104;
var isDictionary = isPageNS && mw.config.get('Dictionary of National');
// various cleanup
editor
// Tamil missing template to none as per request
.replace(/;\s\{\{Tamil missing\}\}/g, '; ');
}
}
],
{ category:'↓🔻↓ நீக்குக ↓🔻↓', forNamespaces:'page' } // common fields
);
});
// end of TemplateScript
if ($.inArray(mw.config.get('wgAction'), ['edit', 'submit']) !== -1) {
mw.loader.using('user.options', function() {
if (mw.user.options.get( 'showtoolbar' ) == 1) {
$.when(
mw.loader.using('mediawiki.toolbar'),
$.ready
).then(addExtraButtons);
}
});
}