Rephrase Sarcastic Utterances (Mechanical Turk HIT)

Copies text to rewrite into box to prevent unncessary retyping also auto selects moderate difficulty

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name       Rephrase Sarcastic Utterances (Mechanical Turk HIT)
// @namespace  ScriptSpace0034
// @version    0.1.1
// @description  Copies text to rewrite into box to prevent unncessary retyping also auto selects moderate difficulty
// @include    https://www.mturk.com/mturk*
// @require    http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
// ==/UserScript==

$(document).ready(
    function() {
        // find HIT
        if ( $("div#hit-wrapper").find("p.overview:contains('Rephrase Sarcastic Utterances to Represent Actual Meaning')").length ) {
            // Select moderate difficulty
            $("input[value='Selection_Mw--']").prop('checked', true);
            
            var myString = "something format_abc";
            var myRegexp = /Original sarcastic utterance: (.*)/;
            var match = myRegexp.exec( $("div.question-content-wrapper").first().find("p.title").text() );
            $("textarea#Answer_1_FreeText").val(match[1]);
    		
            $("p.radiobutton-wrapper").mousedown(
                function(event) {
                    switch (event.which) {
                        case 1:
                       		$(this).find("input[type='radio']").prop('checked', true);
                            break;
                    }
        		}
       		);
            
        }
    }
);