Mturk ID Copy/Paste

For Amazon Mechanical Turk (Mturk). Places an unobtrusive button on survey pages 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. Edited by Swole_hamster to add more domains.

当前为 2015-05-20 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Mturk ID Copy/Paste
  3. // @author Swole_hamster
  4. // @icon http://icons.iconarchive.com/icons/flameia/rabbit-xp/32/documents-icon.png
  5. // @version 1.14
  6. // @namespace http://www.mturkforum.com
  7. // @description For Amazon Mechanical Turk (Mturk). Places an unobtrusive button on survey pages 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. Edited by Swole_hamster to add more domains.
  8. // @include https://www.mturk.com/mturk/dashboard
  9. // @include http://*.qualtrics.com/*
  10. // @include https://*.qualtrics.com/*
  11. // @include https://*.*.qualtrics.com/*
  12. // @include http://*.surveygizmo.com/*
  13. // @include https://*.surveygizmo.com/*
  14. // @include https://docs.google.com/forms/*
  15. // @include https://*.surveymonkey.com/*
  16. // @include https://*.soscisurvey.de/*
  17. // @include http://*.dartmouth.edu/*
  18. // @include https://*.dartmouth.edu/*
  19. // @include https://*.vennliapp.com/*
  20. // @include http://*.ualberta.ca/*
  21. // @include https://*.unipark.de/*
  22. // @include http://*.unipark.de/*
  23. // @include http://*.*.brown.edu/*
  24. // @include http://*.*.columbia.edu/*
  25. // @include http://www.marshlabduke.com/*
  26. // ==/UserScript==
  27.  
  28.  
  29. if (!this.GM_getValue || (this.GM_getValue.toString && this.GM_getValue.toString().indexOf("not supported")>-1)) {
  30. this.GM_getValue=function (key,def) {
  31. return localStorage[key] || def;
  32. };
  33. this.GM_setValue=function (key,value) {
  34. return localStorage[key]=value;
  35. };
  36. }
  37.  
  38. workerID = GM_getValue("workerID");
  39. if(!workerID || workerID == "") {
  40. if (window.location.href == "https://www.mturk.com/mturk/dashboard") {
  41. workerIDNode = document.evaluate("//span[@class='orange_text_right']",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);
  42. for (i=0; i<workerIDNode.snapshotLength; i++) {
  43. nd = workerIDNode.snapshotItem(i);
  44. idstring = nd.innerHTML;
  45. workerID = idstring.split(': ')[1];
  46. GM_setValue("workerID",workerID);
  47. }
  48. } else {
  49. workerID="";
  50. GM_setValue("workerID","");
  51. }
  52. } else {
  53. if (!/https?:\/\/www.mturk.com\/mturk\/*/.test(window.location.href)) {
  54. idDiv = document.createElement('div');
  55. idDiv.id = "workerIDDiv";
  56. idInner = "<input type='text' onmouseover='javascript:this.focus();this.select() ;' onmouseout='javascript:this.blur();' value='" + workerID + "' style='position:fixed;border:none;top:25px;z-index:10000;right:5px;padding:1px 3px;background:#33CC00;font-size:10px;color:white;' readonly/>";
  57. idDiv.innerHTML = idInner;
  58. document.body.insertBefore(idDiv,document.body.firstChild);
  59. }
  60. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址