Here's a quick script for the RoofTyper HITs if they come back. If it isn't working, send me a message and I'll try to update it!
1-3 for roof shape choices
q-e for the different issues
set autosubmit true/false to submit/not submit after using one of the keybinds
p.s. - if you have autosubmit off, don't use any of the keybinds if you type in the suggestion box in the HIT. You choice will get changed
Code:
// ==UserScript==
// @name
RoofTyper Helper
// @version
2.0
// @author
slothbear
// @include
https://rooftyper.com/*
// @require
https://code.jquery.com/jquery-3.2.1.min.js
// ==/UserScript==
// 1-3 for the roof shape choices
// q,w,e for the issue choices
var autosubmit = false;
//set true or false to submit after using a keybind
$(function() {
const is_roofShape = document.body.innerText.indexOf('Roof Shape') > -1;
if (!is_roofShape) return false;
//end if sanity check finds nothing
roofShape();
});
function roofShape() {
$('p').eq(0).remove();
//remove some extra text
$(document).keydown(function(e) {
if (e.key.match(/[1-3]/)) {
//1-3 for roof shapes
var roofShapeChoice = e.key - 1;
$('input.shape:radio').eq(roofShapeChoice).click();
} else if (e.key === 'q' ) {
//q - e for issues
$('input[name="issue"]').eq(0).click();
} else if (e.key === 'w') {
//q-e for issues
$('input[name="issue"]').eq(1).click();
} else if (e.key === 'e') {
//q-e for issues
$('input[name="issue"]').eq(2).click();
}
if (autosubmit) $('#submitButton').click();
//submit hit if 'autosubmit = true'
});
}