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 by copy and paste or drag and drop. This is the UPDATED version of Tjololo's earlier work.

当前为 2020-02-10 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Mturk ID Copy/Paste
  3. // @author Swole_hamster
  4. // @license Simplified BSD license
  5. // @icon http://icons.iconarchive.com/icons/flameia/rabbit-xp/32/documents-icon.png
  6. // @version 2.94
  7. // @namespace http://www.mturkforum.com
  8. // @description For Amazon Mechanical Turk (Mturk). Places an unobtrusive button on survey pages which provides quick access to copy your mTurk worker ID by copy and paste or drag and drop. This is the UPDATED version of Tjololo's earlier work.
  9. // @include https://worker.mturk.com/dashboard*
  10. // @include http://*.qualtrics.com/*
  11. // @include https://*.qualtrics.com/*
  12. // @include https://*.*.qualtrics.com/*
  13. // @include http://*.*.qualtrics.com/*
  14. // @include http://*.surveygizmo.com/*
  15. // @include https://*.surveygizmo.com/*
  16. // @include https://docs.google.com/forms/*
  17. // @include https://*.surveymonkey.com/*
  18. // @include https://*.vennliapp.com/*
  19. // @include https://*.*.*.de/*
  20. // @include http://*.*.*.de/*
  21. // @include https://*.*.de/*
  22. // @include http://*.*.de/*
  23. // @include https://*.de/*
  24. // @include http://*.de/*
  25. // @include http://*.*.*.edu/*
  26. // @include https://*.*.*.edu/*
  27. // @include http://*.*.edu/*
  28. // @include https://*.*.edu/*
  29. // @include http://*.*.*.ca/*
  30. // @include https://*.*.*.ca/*
  31. // @include http://*.*.ca/*
  32. // @include https://*.*.ca/*
  33. // @include http://www.marshlabduke.com/*
  34. // @include https://*.typeform.com/*
  35. // @include http://surveys*.surveyanalytics.com/*
  36. // @include http://*.cspurdue.com/*
  37. // @include http://questionpro.com/*
  38. // @include https://questionpro.com/*
  39. // @include https://*.kwiksurveys.com/*
  40. // @include https://*.wonderliconline.com/*
  41. // @include http://*.lab42.com/*
  42. // @include http://turkitron.com/*
  43. // @include http://sgiz.mobi/*
  44. // @include http://www.consumerbehaviorlab.com/*
  45. // @include https://www.psychdata.com/*
  46. // @include https://*.*.*.ac.uk/*
  47. // @include https://*.*.ac.uk/*
  48. // @include http://*.*.*.ac.uk/*
  49. // @include http://*.*.ac.uk/*
  50. // @include http://survey.psy.unipd.it/*
  51. // @include https://www.predikkta.com/*
  52. // @include https://*.userzoom.com/*
  53. // @include https://www.vopspsy.ugent.be/*
  54. // @include http://crsi.byethost33.com/*
  55. // @include https://www.psychdata.com/*
  56. // @include http://hospitalityexperiments.net/*
  57. // @include http://www.dise-online.net/*
  58. // @include https://www.descil.ethz.ch/apps/mturk/*
  59. // @include https://www.tfaforms.com/*
  60. // @include https://*.shinyapps.io/*
  61. // @include https://mutual-science.org/*
  62. // @include http://*/TurkGate/*
  63. // @include http://jbfreeman.net/webmt/*
  64. // @include http://*.fluidsurveys.com/*
  65. // @include https://gate.aon.com/*
  66. // @include https://www.cvent.com/Surveys/*
  67. // @include http://*/limesurvey/*
  68. // @include http://www.ets-research.org/*
  69. // @include https://www.psychsurveys.org/*
  70. // @include https://*.herokuapp.com/*
  71. // @include https://*.wufoo.com/*
  72. // @grant GM_setValue
  73. // @grant GM_getValue
  74. // @grant GM_registerMenuCommand
  75. // ==/UserScript==
  76.  
  77. var workerID = GM_getValue("workerID");
  78.  
  79. if (/https:\/\/worker.mturk.com\/dashboard/.test(window.location.href)) {
  80. var workerIDNode = document.evaluate("//span[@data-reactid='.0.1.0']",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);
  81. var newWorkerID = workerIDNode.snapshotItem(0).innerHTML;
  82. if(!workerID || workerID === "" || workerID != newWorkerID) {
  83. GM_setValue("workerID",newWorkerID);
  84. }
  85. } else if (!/worker.mturk.com\/*/.test(window.location.href)) {
  86. var idDiv = document.createElement('div');
  87. idDiv.id = "workerIDDiv";
  88. var idInner = "<input type='text' "+
  89. "onmouseover='javascript:this.focus();this.select() ;'" +
  90. "onmouseout='javascript:this.blur();' value='" + workerID +
  91. "' style='position:fixed;border:thick solid #010101;"+
  92. "top:20px;"+
  93. "z-index:10000;" +
  94. "right:1px;padding:5px 3px;"+
  95. "background:#560E49;"+
  96. "font-size:13px;color:white;' readonly/>";
  97. idDiv.innerHTML = idInner;
  98. document.body.insertBefore(idDiv,document.body.firstChild);
  99. }