Skip to content

Instantly share code, notes, and snippets.

@cmargroff
Last active January 29, 2019 01:52
Show Gist options
  • Select an option

  • Save cmargroff/084a6dcbfe263d57449bcbd8e77d2389 to your computer and use it in GitHub Desktop.

Select an option

Save cmargroff/084a6dcbfe263d57449bcbd8e77d2389 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name PkmnCards Random Hotkey
// @namespace https://pkmncards.com/
// @version 0.1.3
// @description Adds a keyboard hotkey to jump to a random card.
// @author Chris Margroff
// @match https://pkmncards.com/*
// @grant none
// ==/UserScript==
(function(w) {
w.addEventListener('keydown', function(e){
if(e.keyCode == 191){
//if key is ?
w.location = w.location.origin+'/?random';
}
}, false);
})(window);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment