// ==UserScript==
// @name MonkeyLearn - Categorize a software review by topic (~10 seconds)
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author turker
// @grant none
// @require http://code.jquery.com/jquery-latest.min.js
// @include *
// @exclude http://www.mturkcrowd.com/*
// ==/UserScript==
if ( $("body:contains('Review text:')").length ) {
document.getElementsByName("Q3Answer")[0].focus();
var category = document.getElementsByClassName("panel-body")[0].getElementsByTagName("li")[0].innerText;
findEnd = category.indexOf(":");
catAlone = category.substr(0,findEnd) + " ";
document.getElementsByClassName("container")[0].getElementsByTagName("p")[2].innerHTML = "Category to check for is<br><font color=red size=25>" + catAlone + "<br>" + document.getElementsByClassName("container")[0].getElementsByTagName("p")[2].innerHTML;
document.getElementsByClassName("container")[0].getElementsByTagName("p")[2].innerHTML = document.getElementsByClassName("container")[0].getElementsByTagName("p")[2].innerHTML.replace("Review text:","");
document.getElementsByTagName("body")[0].onkeydown = function(event) {
if (event.keyCode == 49) {
document.getElementsByName("Q3Answer")[0].click();
// document.getElementById("submitButton").click();
}
if (event.keyCode == 50) {
document.getElementsByName("Q3Answer")[1].click();
// document.getElementById("submitButton").click();
}
};
}