Skip to content

Commit

Permalink
Made gumroad2qr smaller.
Browse files Browse the repository at this point in the history
  • Loading branch information
xenomachina committed Apr 5, 2012
1 parent 236a449 commit f2962f2
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions bookmarklets/gumroad2qr.bookmarklet
Expand Up @@ -2,22 +2,22 @@
// you can print. It removes links and the purchase form, and replaces
// the buy button with a QR code and URL.

var b = document.getElementById('i_want_this_button');
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;
p.removeChild(b);
var img = document.createElement('img');
img.src='http://chart.googleapis.com/chart?chs=200x200&cht=qr&choe=UTF-8&chld=L|0&chl=' + escape(document.location);
R(b)
var img = d.createElement('img');
img.src='http://chart.googleapis.com/chart?chs=200x200&cht=qr&choe=UTF-8&chld=L|0&chl=' + escape(d.location);
img.style.padding='1em';
var c = document.createElement('center');
var c = d.createElement('center');
c.style.fontSize='200%';
c.style.fontFamily='monospace';
c.appendChild(img);
c.appendChild(document.createElement('br'));
c.appendChild(document.createTextNode(document.location));
c.appendChild(d.createElement('br'));
c.appendChild(d.createTextNode(d.location));
p.appendChild(c);
var b = document.getElementById('buy-form-main');
b.parentElement.removeChild(b);
var b = document.getElementById('sharing');
b.parentElement.removeChild(b);
var b = document.getElementsByClassName('gumroad-pitch')[0];
b.parentElement.removeChild(b);
R(I('buy-form-main'));
R(I('sharing'));
R(d.getElementsByClassName('gumroad-pitch')[0]);

0 comments on commit f2962f2

Please sign in to comment.