diff --git a/djbuy.js b/djbuy.js index f7902c0..7929e2b 100644 --- a/djbuy.js +++ b/djbuy.js @@ -10,7 +10,7 @@ javascript:(function () { }); return result; }, - about = "\n\n\n\nDJBuy 1.4, chingc.tumblr.com", + about = "\n\n\n\nDJBuy 1.4.2, https://github.com/chingc/DJBuy", my_location = location.hostname + location.pathname, shop_music = /djmaxcrew\.com\/maxshop\/shop_music_detail\.asp/.test(my_location), shop_item = /djmaxcrew\.com\/maxshop\/shop_dj_(icon|title).asp/.test(my_location), diff --git a/djbuy.min.js b/djbuy.min.js index b82acbe..c49930b 100644 --- a/djbuy.min.js +++ b/djbuy.min.js @@ -1 +1 @@ -javascript:(function(){"use strict";var e=function(e){return parseInt(e.replace(/,/g,""),10)},t=function(t){var n=0;t.each(function(){n+=e(this.innerHTML)});return n},n="\n\n\n\nDJBuy 1.4, chingc.tumblr.com",r=location.hostname+location.pathname,i=/djmaxcrew\.com\/maxshop\/shop_music_detail\.asp/.test(r),s=/djmaxcrew\.com\/maxshop\/shop_dj_(icon|title).asp/.test(r),o,u,a,f,l;if(i||s){u=e($(".login_maxpoint .point_blue").text());a=i?t($(".i_check:enabled").siblings("font")):t($(".point > font"));o="Available Max Points: "+u+"\nMax Points Needed: "+a+"\n\n";if(a===0){alert(o+"Nothing to buy. Returning..."+n);history.back()}else if(a>u){alert(o+"Not enought Max Points to buy everything."+n)}else{if(confirm(o+"Proceed with purchase?"+n)){f=[];l=true;if(i){$(".i_check:enabled").each(function(){f.push(this.value)});$.ajax({url:"http://"+location.hostname+"/maxshop/ProcShopMusic.asp?si="+f.join("|"),async:false}).done(function(){alert("Purchased!"+n)}).fail(function(){alert("Unable to make purchase."+n)});history.back()}else{$("li[onclick]").each(function(){var e;e=/moveShopItemConfirm\('(\w+)'\)/.exec(this.onclick);if(e){f.push(e[1])}});$.each(f,function(e,t){$.ajax({url:"http://"+location.hostname+"/maxshop/ProcShopItem.asp?i="+t,async:false}).fail(function(){l=false})});if(l){alert("Items purchased!"+n)}else{alert("Unable to make one or more purchases."+n)}location.reload()}}}}})() \ No newline at end of file +javascript:(function(){"use strict";var e=function(e){return parseInt(e.replace(/,/g,""),10)},t=function(t){var n=0;t.each(function(){n+=e(this.innerHTML)});return n},n="\n\n\n\nDJBuy 1.4.2, https://github.com/chingc/DJBuy",r=location.hostname+location.pathname,i=/djmaxcrew\.com\/maxshop\/shop_music_detail\.asp/.test(r),s=/djmaxcrew\.com\/maxshop\/shop_dj_(icon|title).asp/.test(r),o,u,a,f,l;if(i||s){u=e($(".login_maxpoint .point_blue").text());a=i?t($(".i_check:enabled").siblings("font")):t($(".point > font"));o="Available Max Points: "+u+"\nMax Points Needed: "+a+"\n\n";if(a===0){alert(o+"Nothing to buy. Returning..."+n);history.back()}else if(a>u){alert(o+"Not enought Max Points to buy everything."+n)}else{if(confirm(o+"Proceed with purchase?"+n)){f=[];l=true;if(i){$(".i_check:enabled").each(function(){f.push(this.value)});$.ajax({url:"http://"+location.hostname+"/maxshop/ProcShopMusic.asp?si="+f.join("|"),async:false}).done(function(){alert("Purchased!"+n)}).fail(function(){alert("Unable to make purchase."+n)});history.back()}else{$("li[onclick]").each(function(){var e;e=/moveShopItemConfirm\('(\w+)'\)/.exec(this.onclick);if(e){f.push(e[1])}});$.each(f,function(e,t){$.ajax({url:"http://"+location.hostname+"/maxshop/ProcShopItem.asp?i="+t,async:false}).fail(function(){l=false})});if(l){alert("Items purchased!"+n)}else{alert("Unable to make one or more purchases."+n)}location.reload()}}}}})() \ No newline at end of file