User:John doe 120/vector.js

function addDateCreated { var url = window.location.href; //if (!/^https:\/\/en\.wikipedia\.org\/wiki\/.*/.test(url)) //	return; var element = document.getElementById('t-info'); if (element === null || element.childElementCount === 0) return; element = element.children[0]; if (element.tagName.toLowerCase != 'a') return; url = element.href; if (!/^https:\/\/www\.mediawiki\.org\/w\/index\.php\?title=.*?&action=info$/.test(url)) return; var oReq = new XMLHttpRequest; function reqListener { var text = this.responseText; var match = text.match(/mw-pageinfo-firsttime">.*?(.*?).*?(.*?)</); if (match === null) return; datetime = match[1]; element.title += '. Last modified: ' + datetime; }	oReq.addEventListener("load", reqListener); oReq.open("GET", url); oReq.send; } addDateCreated;