The Redeemer

Pops up the Steam product activation dialog when copying keys from bundle pages. Currently supports Groupees, Humble Bundle, Indie Royale and Indie Gala. Obviously requires that Steam is installed but also that it's allowed as the handler of steam:// protocol messages.

当前为 2015-12-15 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        The Redeemer
// @namespace   raina
// @description Pops up the Steam product activation dialog when copying keys from bundle pages. Currently supports Groupees, Humble Bundle, Indie Royale and Indie Gala. 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|library)/
// @include     /^https?:\/\/www\.indieroyale\.com\/bundle\/key\//
// @include     /^https?:\/\/www\.indiegala\.com/(profile|game)\?/
// @include     /^https?:\/\/groupees\.com\/purchases/
// @include     /^https?:\/\/www\.steamgifts\.com\/giveaways\/won/
// @include     /^https?:\/\/www\.bundlestars\.com\/en\/orders/
// @include     /^https?:\/\/steamcompanion\.com\/gifts\/won/
// @include     /^https?:\/\/(www\.)?flyingbundle\.com\/users\/account/
// @include     /^https?:\/\/(www\.)dailyindiegame\.com\/account_page\.html/
// @include     /^https?:\/\/www\.greenmangaming\.com\/user\/account/
// @include     /^https:\/\/secure\.nuuvem\.com\/account\/library/
// @include     /^http:\/\/www\.dlh\.net\/en\/steam-keys\.html/
// @version     1.6.1
// @grant       none
// ==/UserScript==
(function() {
	"use strict";
	var activateProduct = function(e) {
		var productCode = window.getSelection().toString().trim();
		if (!productCode) {
			productCode = e.target.value;
		}
		if (/^[\d\w]{2,5}(\-[\d\w]{4,5}){2,4}$/.test(productCode)) {
			window.location.href = "steam://open/activateproduct";
		}
	};
	window.addEventListener("copy", activateProduct, false);
}());