// ==UserScript== // @name AuTo Redeemer Steamkey(自动激活Steamkey) // @namespace HCLonely // @description 复制网页中的Steamkey后自动打开激活页面 // @include *://store.steampowered.com/account/registerkey?key=*-*-* // @include *://www.dlh.net/en/* // @include *://www.chrono.gg/* // @include *://groupees.com/* // @include *://secure.nuuvem.com/account/library/* // @include *://www.humblebundle.com/* // @include *://*dailyindiegame.com/account_page.html/* // @include *://*flyingbundle.com/users/account/* // @include *://steamcompanion.com/gifts/won/* // @include *://www.bundlestars.com/* // @include *://www.greenmangaming.com/user/account/* // @include *://www.indiegala.com/* // @include *://www.oplata.info/info/buy.asp/* // @include *://www.indiedb.com/giveaways/* // @include *://mail.*.com/* // @include *://steamcn.com/* // @include *://bundle.ccyycn.com/order/id/* // @include *://vk.com/* // @include *://marvelousga.com/*.php?id=* // @include *://www.orlygift.com/* // @include *://www.steamgifts.com/giveaways/won/ // @include *://keychampions.net/giveaways/* // @include *://giveaway.su/giveaway/* // @include *://www.chubbykeys.com/giveaway.php?id=* // @include *://giveawayhopper.com/giveaway.php?id=* // @include *://simplo.gg/index.php?giveaway=* // @include *://www.skngiveaways.com/* // @include *://dupedornot.com/giveaway.php?id=* // @include *://www.fanatical.com/* // @include *://www.oneplay.com/en/* // @include *://gogobundle.com/* // @include *://www.bunchkeys.com/* // @include *://otakubundle.com/* // @include *://www.gamersgate.com/* // @include *//*lazyguysbundle.com/* // @include *://www.flyingbundle.com/* // @include *://cubicbundle.com/* // @include *://na.alienwarearena.com/* // @include *://gleam.io/* // @version 0.2 // @grant none // @downloadURL none // ==/UserScript== (function() { "use strict"; /****************************************/ /*----------------检测key并打开激活页面---------------------*/ var activateProduct = function(e) { var productKey = window.getSelection().toString().trim() || e.target.value; if (/^[\d\w]{2,5}(\-[\d\w]{4,5}){2,4}$/.test(productKey)) { if (confirm("检测到神秘key,是否进入steam激活页面?")) { window.open("https://store.steampowered.com/account/registerkey?key=" + productKey, "_blank"); } else { // } } }; window.addEventListener("copy", activateProduct, false); }()); /**********************************************/ /*---------------------自动激活key----------------------------*/ (function() { 'use strict'; var chk = document.getElementById('accept_ssa');//通过getElementById获取节点 chk.checked = true;//设置checked为选中状态 if (chk.checked = true) { //检测checked是否为选中状态 var oBtn = document.getElementById('register_btn'); oBtn.onclick = function(){ }; oBtn.click(); //模拟点击事件,页面刷新,出发点击事件 } else { // } })();