// ==UserScript== // @name The Redeemer // @namespace raina // @description Pops up the Steam product activation dialog when copying keys from bundle pages. Currently supports Humble Bundle and Indie Royale. Obviously requires that Steam is installed but also that it's allowed as the handler of steam:// protocol messages. // @include /^https?:\/\/www\.humblebundle\.com\/downloads\?/ // @include /^https?:\/\/www\.humblebundle\.com\/home\/keys/ // @include /^https?:\/\/www\.humblebundle\.com\/home\/library/ // @include /^https?:\/\/www\.indieroyale\.com\/bundle\/key\// // @version 1.1 // @grant none // @downloadURL none // ==/UserScript== (function() { "use strict"; var activateProduct = function(e) { if ("copy" === e.type || ("KeyC" === e.code && (e.ctrlKey || e.metaKey))) { window.location.href = "steam://open/activateproduct"; } }; window.addEventListener("copy", activateProduct, false); window.addEventListener("keypress", activateProduct, false); }());