您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
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 or drag and drop. Does not show on mturk pages. Edited by Swole_hamster to add more domains.
当前为
- // ==UserScript==
- // @name Mturk ID Copy/Paste
- // @author Swole_hamster
- // @version 1.1
- // @namespace http://www.mturkforum.com
- // @homepage http://mturkforum.com/showthread.php?4443-Worker-ID-Copy-Paste&p=57029
- // @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 or drag and drop. Does not show on mturk pages. Edited by Swole_hamster to add more domains.
- // @grant GM_setValue
- // @grant GM_getValue
- // @grant GM_registerMenuCommand
- // @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/*
- // @include https://*soscisurvey.de/*
- // @include http://*.dartmouth.edu/*
- // @include https://*.dartmouth.edu/*
- // @include https://*.vennliapp.com/*
- // @include http://*.ualberta.ca/*
- // @include https://*.unipark.de/*
- // @include http://*.unipark.de/*
- // ==/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<workerIDNode.snapshotLength; i++) {
- nd = workerIDNode.snapshotItem(i);
- idstring = nd.innerHTML;
- workerID = idstring.split(': ')[1];
- GM_setValue("workerID",workerID);
- }
- } else {
- workerID="";
- GM_setValue("workerID","");
- }
- } else {
- if (!/https?:\/\/www.mturk.com\/mturk\/*/.test(window.location.href)) {
- idDiv = document.createElement('div');
- idDiv.id = "workerIDDiv";
- 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/>";
- idDiv.innerHTML = idInner;
- document.body.insertBefore(idDiv,document.body.firstChild);
- }
- }