Skip to content

Instantly share code, notes, and snippets.

@polarblau
Last active December 15, 2015 02:19
Show Gist options
  • Save polarblau/5186457 to your computer and use it in GitHub Desktop.
Save polarblau/5186457 to your computer and use it in GitHub Desktop.
Sonera (Finland) Invoice Bookmarklet. Will open only the invoice (without iframe) and trigger the printing dialog.
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f%3De.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc%3Da.createElement(%22script%22)%3Bc.type%3D%22text/javascript%22%3Bc.src%3D%22//ajax.googleapis.com/ajax/libs/jquery/%22%2Bg%2B%22/jquery.min.js%22%3Bc.onload%3Dc.onreadystatechange%3Dfunction()%7Bif(!b%26%26(!(d%3Dthis.readyState)%7C%7Cd%3D%3D%22loaded%22%7C%7Cd%3D%3D%22complete%22))%7Bh((f%3De.jQuery).noConflict(1),b%3D1)%3Bf(c).remove()%7D%7D%3Ba.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.8.0%22,function(%24,L)%7Bvar%20loc%3D%24(%22iframe.iFrameStyle%22).attr(%22src%22)%3Bvar%20win%3Dwindow.open(loc)%3Bwin.print()%3B%7D)%3B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment