// ==UserScript==
// @name Sergey Submit 2.0
// @namespace http://tampermonkey.net/
// @version 2.0
// @description Add submit button
// @author Squatty
// @match https://www.mturkcontent.com/dynamic/*
// @grant none
// @require http://code.jquery.com/jquery-3.1.1.min.js
// ==/UserScript==
window.focus();
if ($("h4:contains(Carefully review the following examples before you begin the task.)").length){
document.getElementById(`instructions`).style.display = `none`;
document.getElementById(`sample-task`).style.display = `none`;
$('input:radio[value="both mature"]').prop('checked', true);
$('input:radio[value="1"]').prop('checked', true);
document.body.insertAdjacentHTML(
`beforeend`,
`<div id="myDiv" class="submitpanel">` +
`<p><button id="button1">Submit</button></p>` +
`</div>`
);
document.head.insertAdjacentHTML(
`beforeend`,
`<style>` +
`.submitpanel {margin:5px; background:lightblue; padding:2px 5px;}` +
`.submitpanel {z-index:10; position:fixed; top:30%;right:50%; background:aliceblue; opacity:0.9; transform:translateX(50%);}` +
`.submitpanel button {font-size: 12px; margin-right:2px; padding:1px;}` +
`</style>`
);
document.getElementById(`button1`).addEventListener(`click`, function () {
document.querySelector(`[type="submit"]`).click();
});
}