// ==UserScript== // @name ID Copy/Paste // @author Sasquatch // @version 1.0.5 // @namespace http://www.mturkforum.com // @homepage http://mturkforum.com/showthread.php?4443-Worker-ID-Copy-Paste&p=57029 // @description Places an unobtrusive button on the page which provides quick access to copy your mTurk worker ID. Edited by Tjololo12: Hover highlight for easy copy-paste, does not show on mturk pages // @include https://www.mturk.com/mturk/dashboard // @include http://*.qualtrics.com/* // @include https://*.qualtrics.com/* // @include http://*surveygizmo.com/* // @include https://*surveygizmo.com/* // @include https://docs.google.com/forms/* // @include https://*.surveymonkey.com/* // @downloadURL https://update.greasyfork.icu/scripts/915/ID%20CopyPaste.user.js // @updateURL https://update.greasyfork.icu/scripts/915/ID%20CopyPaste.meta.js // ==/UserScript== if (!this.GM_getValue || (this.GM_getValue.toString && this.GM_getValue.toString().indexOf("not supported")>-1)) { this.GM_getValue=function (key,def) { return localStorage[key] || def; }; this.GM_setValue=function (key,value) { return localStorage[key]=value; }; } workerID = GM_getValue("workerID"); if(!workerID || workerID == "") { if (window.location.href == "https://www.mturk.com/mturk/dashboard") { workerIDNode = document.evaluate("//span[@class='orange_text_right']",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null); for (i=0; i"; idDiv.innerHTML = idInner; document.body.insertBefore(idDiv,document.body.firstChild); } }