Skip to content

Instantly share code, notes, and snippets.

@daghlny
Last active March 6, 2017 07:23
Show Gist options
  • Save daghlny/e938343d4d6e82355a47bcd3b20810d7 to your computer and use it in GitHub Desktop.
Save daghlny/e938343d4d6e82355a47bcd3b20810d7 to your computer and use it in GitHub Desktop.
to get bundle stars keys automatically
// ==UserScript==
// @name BundleStar_GetKey&Gift
// @Namespace http://tampermonkey.net/
// @version 1.03
// @description shows how to use babel compiler
// @icon https://cdn.bundlestars.com/production/brand/logo.png
// @author KamiXuan
// @match https://www.bundlestars.com/en/orders*
// ==/UserScript==
//扩散范围仅限STEAMCN论坛 当然你扩散到其他地方我也是管不到你的
$ = unsafeWindow.jQuery;
(function($) {
unsafeWindow.redeem=function redeem()
{$("a[ng-click='redeemSerial(order._id, item._id, game)'][class='ng-scope'][style='color:#d0fe00']").click();};
unsafeWindow.get=function get(){
$("#kamitext").val("");
$("input[ng-model='game.key']").each(function(index){if(index%2!==0){
$("#kamitext").val($("#kamitext").val()+$(this).val()+",");}});};
unsafeWindow.getWithName=function (){
$("#kamitext").val("");
$("input[ng-model='game.key']").each(function(index){if(index%2!==0){
$("#kamitext").val($("#kamitext").val()+$(this).parent().parent().parent().parent().find(".title").text()+":"+this.value+"\n");}});};
$("<button value='redeem' onclick='redeem()' id='kamiredeem'>REDEEM</button>").insertAfter($("h2"));
$("<button value='get' onclick='get()' id='kamiget'>GET</button>").insertAfter($("#kamiredeem"));
$("<button value='getwithname' onclick='getWithName()' id='kamigetname'>GETwithNAME</button>").insertAfter($("#kamiget"));
$("</br><textarea id='kamitext' style='width:400px;height:400px;'></textarea>").insertAfter($("#kamigetname"));})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment