பயனர்:Info-farmer/cleanUp.js
குறிப்பு - சேமித்த பின்னர், நீங்கள் செய்த மாற்றங்களைக் காண்பதற்கு உங்கள் உலவியின் இடைமாற்று அகற்றப்பட வேண்டும்.
- மொஸில்லா பயர்பாக்ஸ் / சபாரி: Shift+Reload, அல்லது Ctrl-F5 அல்லது Ctrl-R (⌘-R Mac ல்)
- கூகிள் குரோம் Ctrl-Shift-R அழுத்தவும். (⌘-Shift-R Mac ல்) ;
- இண்டர்நெட் எக்ஸ்ப்ளோரர்: Ctrl-Refresh அல்லது Ctrl-F5 ஐ அழுத்தவும்.
- ஒபேரா: Tools → Preferences இல் இடைமாற்றை அகற்றவும்;
/*
<source lang="javascript">
</source>
This script helps to replace/remove input data in the opened page and helps to edit quikly and regex editor.
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: '{{gap}}',
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
// no need templates(before paragraphs) as per community consensus
.replace(/\{\{gap\}\}/g, '').replace(/\{\{gap2\}\}/g, '').replace(/\<br\>/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);
}
});
}