User:Quibik/EightRequestsHelper.js

// To use this script, place "importScript( 'User:Quibik/EightRequestsHelper.js' ); // User:Quibik/EightRequestsHelper.js"

// to the bottom of the page opened by http://en.wikipedia.org/wiki/Special:MyPage/vector.js

// This will add a link "Update Eight Requests" to the menu next to the search box, if you are on the Eight Requests page.

function eightRequestsHelper() {

if (/erhelper=init/i.test(location.href)) {

//window.open("/w/index.php?title=Wikipedia:Graphics_Lab/Photography_workshop/Eight_Requests/Users_log&action=edit&erhelper=process", "ER User Log");

window.open("/w/index.php?title=Wikipedia:Graphics_Lab/Photography_workshop/Eight_Requests/Archive/" + (new Date()).getFullYear() + "&action=edit&erhelper=process", "ER Archive");

window.open("http://commons.wikimedia.org/wiki/User:Quibik/Files_by_viewcounts", "Files by viewcounts");

}

if (/\/Eight_Requests/i.test(location.href) && mw.config.get( 'wgAction' ) === 'edit') {

if (!/\/Eight_Requests\//i.test(location.href)) {

// Replace the completed requests with empty fields

var m = /