User:BethNaught/retrievePagenum.js

/* global mw, $ */

function retrievePagenum { "use strict"; var selector = "a[title^='" + $.escapeSelector('Page:' + mw.config.get('wgTitle')) + "']"; console.log(selector); var lintyNumber; $.get({		url: document.getElementById('ca-proofreadPageIndexLink').children[0].children[0].href,		success: function(data) {			lintyNumber = $(selector, $(data)).html;			},		async: false	}); console.log(lintyNumber); return /^(?:)?(?: )?(.*)$/.exec(lintyNumber)[1]; }