Skip to content

Instantly share code, notes, and snippets.

@cdzombak
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdzombak/78d4af4c075d15e96ab5 to your computer and use it in GitHub Desktop.
Save cdzombak/78d4af4c075d15e96ab5 to your computer and use it in GitHub Desktop.
Blogtrottr bookmarklet
// original:
javascript:(function(){email=prompt('Please%20enter%20your%20email%20address');%20if(!((email.indexOf('.')%20>%202)%20&&%20(email.indexOf('@')%20>%200))){alert('Email%20address%20is%20invalid');%20return;}%20uri='http://blogtrottr.com';%20f=document.createElement('form');%20f.method='post';%20f.action=uri;%20i0=document.createElement('input');%20i0.type='hidden';%20i0.name='btr_email';%20i0.value=email;%20i1=document.createElement('input');%20i1.type='hidden';%20i1.name='btr_url';%20i1.value=location.href;%20f.appendChild(i0);%20f.appendChild(i1);%20b=document.createElement('body');%20b.appendChild(f);%20h=document.getElementsByTagName('html')[0];%20h.appendChild(b);%20f.submit();})()
// modified:
javascript:(function(){email='chris@chrisdzombak.net';%20if(!((email.indexOf('.')%20>%202)%20&&%20(email.indexOf('@')%20>%200))){alert('Email%20address%20is%20invalid');%20return;}%20uri='http://blogtrottr.com';%20f=document.createElement('form');%20f.method='post';%20f.action=uri;%20i0=document.createElement('input');%20i0.type='hidden';%20i0.name='btr_email';%20i0.value=email;%20i1=document.createElement('input');%20i1.type='hidden';%20i1.name='btr_url';%20i1.value=location.href;%20f.appendChild(i0);%20f.appendChild(i1);%20b=document.createElement('body');%20b.appendChild(f);%20h=document.getElementsByTagName('html')[0];%20h.appendChild(b);%20f.submit();})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment