Browse files

Fixes to gumroad2qr

Stupid JS doesn't support factoring out x.y expressions if y is a
method, so need to create function literals.

Also removed some useless interior spaces.
  • Loading branch information...
1 parent f2962f2 commit 1d6117054c7c43fabe2481b245a4b7f15fbbd4d4 @xenomachina committed Apr 5, 2012
Showing with 13 additions and 12 deletions.
  1. +13 −12 bookmarklets/gumroad2qr.bookmarklet
@@ -2,22 +2,23 @@
// you can print. It removes links and the purchase form, and replaces
// the buy button with a QR code and URL.
-var d = document;
-var I = d.getElementById;
-var R = function(x){x.parentElement.removeChild(x);}
-var b = I('i_want_this_button');
-var p = b.parentElement;
-var img = d.createElement('img');
+var d=document;
+var I=function(x){return d.getElementById(x);};
+var R=function(x){x.parentElement.removeChild(x);};
+var b=I('i_want_this_button');
+var p=b.parentElement;
+var img=d.createElement('img');
img.src='|0&chl=' + escape(d.location);'1em';
-var c = d.createElement('center');
+var c=d.createElement('center');'200%';'monospace';
+var A=function(p,c){p.appendChild(c);};

0 comments on commit 1d61170

Please sign in to comment.