Code:
// ==UserScript==
// @name RI Services receipt transcription
// @author turker
// @namespace turker's stuff
// @version 0.1
// @grant GM_log
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
// @include *
// ==/UserScript==
document.getElementsByTagName("body")[0].onkeydown = function(event) {
if (event.keyCode == 219) {
//bracket key "[" returns hit from queue
document.getElementsByTagName("a")[0].focus();
}
};
how can my script find the return button for this type of hit? the hit is focused on a textbox within an iframe when the hit page loads. I want to remove focus from the frame. the script has to switch focus to the outer part of the hit. you can see from my script by clicking tab, this goes to the first link in the frame, not the first link on the page. I have had this focus problem with other hits too.
@Kadauchi or anyone else can you please help? I am all out of ideas.