// ==UserScript==
// @name john doe
// @version 4
// @description 1 for foreign, 2 for no visible text
// @author SarahAshlee90
// @include https://www.google.com/*
// @grant none
// @require https://code.jquery.com/jquery-3.1.1.min.js
// ==/UserScript==
var submit_Hotkey = false;
setTimeout(function(){
$('div[id="video-placeholder"]').click();
$('input[value="PLAYABLE"]').eq(0).click();
$('input[value="ENGLISH"]').eq(0).click();
$('input[value="ENGLISH"]').eq(1).click();
$('input[value="NOT_SENSITIVE"]').click();
window.onkeydown = function (event) {
if(event.which == 97){
$('input[value="PLAYABLE"]').eq(0).click();
$('input[value="FOREIGN"]').eq(0).click();
$('input[value="FOREIGN"]').eq(1).click();
$('input[value="NOT_SENSITIVE"]').click();
}
if(event.which == 98){
$('input[value="NO_LANGUAGE_PRESENT"]').eq(1).click();
}
if(event.which == 13){
console.log('enter was pressed');
if (submit_Hotkey === true){
$("#submit").click();
}
}
};
}, 888);