Skip to content

Instantly share code, notes, and snippets.

@netizen0911
netizen0911 / discount.js
Created December 4, 2012 17:37
Paypal Coupon Script
<!--
var discnt = 0; // no default percent discount
eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('0 1=2 3("4","5","6");',7,7,'var|coupons|new|Array|coup1|coup2|coup3'.split('|'),0,{}))
var coupdc = new Array ( // place to put discounts for coupon vals
5,
10,
15