Created
August 31, 2017 17:13
-
-
Save SavageCore/71c1da44ea8cc02b9491ff59f3f209f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name The Redeemer | |
// @namespace raina | |
// @description Pops up the Steam product activation dialog when copying keys from bundle/reseller sites. Supports various bundle organizers and legitimate key resellers. Obviously requires that Steam is installed but also that it's allowed as the handler of steam:// protocol messages. | |
// @include /^http:\/\/www\.dlh\.net\/en\/steam-keys\.html/ | |
// @include /^https:\/\/(www\.)?chrono\.gg/ | |
// @include /^https:\/\/groupees\.com\/(profile\/)?purchases/ | |
// @include /^https:\/\/secure\.nuuvem\.com\/account\/library/ | |
// @include /^https:\/\/www\.humblebundle\.com\/(downloads\?|home\/(keys|library))/ | |
// @include /^https?:\/\/(www\.)?dailyindiegame\.com\/account_page\.html/ | |
// @include /^https?:\/\/(www\.)?flyingbundle\.com\/users\/account/ | |
// @include /^https?:\/\/steamcompanion\.com\/gifts\/won/ | |
// @include /^https?:\/\/www\.bundlestars\.com\/en\/orders/ | |
// @include /^https?:\/\/www\.greenmangaming\.com\/user\/account/ | |
// @include /^https?:\/\/www\.indiegala\.com/(profile|game)\?/ | |
// @include /^https?:\/\/www\.oplata\.info\/info\/buy\.asp/ | |
// @include /^https?:\/\/www\.steamgifts\.com\/giveaways\/won/ | |
// @include /^https?:\/\/store.steampowered.com\/account\/registerkey\?/ | |
// @version 1.9 | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
"use strict"; | |
var activateProduct = function(e) { | |
var productKey = window.getSelection().toString().trim() || e.target.value; | |
var m; | |
if ((m = /^[\d\w]{2,5}(\-[\d\w]{4,5}){2,4}$/.exec(productKey)) !== null) { | |
window.open("https://store.steampowered.com/account/registerkey?key=" + m[0]); | |
} | |
}; | |
window.addEventListener("copy", activateProduct, false); | |
// Automatically accept Steam Subscriber Agreement | |
if (window.location.href.match(/^https?:\/\/store.steampowered.com\/account\/registerkey/)) { | |
var ssaElem = document.getElementById('accept_ssa'); | |
if (ssaElem) { | |
ssaElem.checked='checked'; | |
} | |
} | |
}()); |
What exactly does this script do?
When you copy a steam cd key to clipboard it will open up the activation page pre-filledOn 2 Dec 2021 16:51, Korb ***@***.***> ***@***.*** commented on this gist.
What exactly does this script do?
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do I make it work everywhere (on every page)