Skip to content

Instantly share code, notes, and snippets.

@cuylerstuwe
Created April 30, 2018 19:50
Show Gist options
  • Select an option

  • Save cuylerstuwe/8728cee89416f785bb842ebaaa77b61d to your computer and use it in GitHub Desktop.

Select an option

Save cuylerstuwe/8728cee89416f785bb842ebaaa77b61d to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Custom Helper (Tax Engine) - Amazon iFrame Pass to mTurk Work Frame
// @namespace salembeats
// @version 1
// @description .
// @author Cuyler Stuwe (salembeats)
// @include *
// @grant GM_info
// ==/UserScript==
if(window === window.top) {return;}
//if( !document.location.href.includes("amazon.com") || !document.referrer.includes("mturk") ) {return;}
//alert("helperrunning");
(function main() {
document.addEventListener("keydown", function(event) {
//var eventCopy = new KeyboardEvent('keydown', event);
window.parent.postMessage({keypress: {keyCode: event.keyCode, key: event.key, which: event.which}}, "*");
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment