User:Lacrymocéphale/common.js

if (-1 < document.location.href.indexOf('Special:EditWatchlist')) { //TOC tmpElement = $(' ').insertBefore('#toc + form > fieldset > fieldset:first'); tmpElement = $('Select redirections ').insertAfter(tmpElement); tmpElement = $('Select unexisting pages ').insertAfter(tmpElement); //(Article) tmpElement = $('fieldset#editwatchlist-ns0 legend'); tmpElement = $('Select unexisting articles ').insertAfter(tmpElement); //User tmpElement = $('fieldset#editwatchlist-ns2 legend'); tmpElement = $('Select indefinitely blocked users ').insertAfter(tmpElement); //Wikipedia tmpElement = $('fieldset#editwatchlist-ns4 legend'); tmpElement = $('Select unexisting Wikipedia pages ').insertAfter(tmpElement); //File tmpElement = $('fieldset#editwatchlist-ns6 legend'); tmpElement = $('Select unexisting files ').insertAfter(tmpElement); //Template tmpElement = $('fieldset#editwatchlist-ns10 legend'); tmpElement = $('Select unexisting templates ').insertAfter(tmpElement); //Draft tmpElement = $('fieldset#editwatchlist-ns118 legend'); tmpElement = $('Select unexisting drafts ').insertAfter(tmpElement); } function selectRedirects { $('fieldset label span.watchlistredir').parent('label').prev('input[type="checkbox"]').prop('checked', true); } function selectUnexistingPages { selectUnexistingArticles; selectUnexistingWikipediaPages; selectUnexistingFiles; selectUnexistingTemplates; selectUnexistingDrafts; } function selectUnexistingArticles { $('fieldset#editwatchlist-ns0 label a.new:first-child').parent('label').prev('input[type="checkbox"]').prop('checked', true); } function selectIndefinitelyBlockedUsers { $('fieldset#editwatchlist-ns2 a:contains("User contributions")').each(function {		var a = $(this);		$.get(a.attr('href'), function(data) { if (-1 < data.indexOf('indefinite ')) { a.parent('label').prev('input[type="checkbox"]').prop('checked', true); }		});	}); } function selectUnexistingWikipediaPages { $('fieldset#editwatchlist-ns4 label a.new:first-child').parent('label').prev('input[type="checkbox"]').prop('checked', true); } function selectUnexistingFiles { $('fieldset#editwatchlist-ns6 label a.new:first-child').parent('label').prev('input[type="checkbox"]').prop('checked', true); } function selectUnexistingTemplates { $('fieldset#editwatchlist-ns10 label a.new:first-child').parent('label').prev('input[type="checkbox"]').prop('checked', true); } function selectUnexistingDrafts { $('fieldset#editwatchlist-ns118 label a.new:first-child').parent('label').prev('input[type="checkbox"]').prop('checked', true); }