Skip to content

Instantly share code, notes, and snippets.

@pquerner
Last active April 26, 2019 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pquerner/a7f7033385f452c62b836afc0cac553e to your computer and use it in GitHub Desktop.
Save pquerner/a7f7033385f452c62b836afc0cac553e to your computer and use it in GitHub Desktop.
Alexa Skill Repeat
// ==UserScript==
// @name Alexa Repeat Dev Message
// @version 0.1
// @author You
// @match https://developer.amazon.com/alexa/console/ask/test/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
window.setInterval(function(){
jQuery('.askt-dialog__message.askt-dialog__message--request').each(function() {
let $this = jQuery(this);
console.log($this.data('hasbutton'));
if(!$this.data('hasbutton')) {
$this.attr("data-hasButton",true);
$this.on('click', function() {
let $input = jQuery('.askt-utterance__input');
$input
.val(jQuery(this).html())
.change()
.focus();
var e = jQuery.Event("keydown");
e.which = 13; //ENTER
e.keyCode = 13;
jQuery('.askt-utterance__input').trigger(e);
});
}
});
}, 3000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment