MediaWiki:Gadget-Without text.js

/* One-click "Without text"

Tagging an empty page as "Without text" potentially requires

Clearing the header box (of the index-specified default) Clearing the edit box (of any spurious OCR) Clearing the footer box (of the index-specified default) Clicking the "without text" radio box Clicking "Save"

This script performs all of these tasks upon clicking of the "without text" radio box

Users can add this to their scripts by editing Special:MyFiles/common.js and adding the following line

mw.loader.load('//en.wikisource.org/w/index.php?title=MediaWiki:Gadget-Without text.js&action=raw&ctype=text/javascript')



$(function{   qualityContainer = document.getElementById('wpQuality-container');    if (qualityContainer == null) return;    quality0 = qualityContainer.getElementsByClassName('quality0')    withouttext = quality0[0].childNodes[0];    withouttext.addEventListener('click', function  { document.getElementsByName('wpTextbox1')[0].value = ""; document.getElementsByName('wpHeaderTextbox')[0].value = ""; document.getElementsByName('wpFooterTextbox')[0].value = ""; document.getElementsByName('wpSave')[0].click; }); });