Wordpress 'Press This' JS bookmarklet: bUsTEd!
Posted: Sun Nov 29, 2009 3:52 am
NS 1.9.9.18
tried a bunch of hacking around to get this to work, but the only fix is to temp allow the site which is no good since it needs to work with a multitude of sites. i've been unable to find exactly what option in NS is blocking this. domains changed in following code...
looks like another fella fixed it by changing the code a bit, but it ain't working for me. here's his:
EDIT: should mention that NS failing to prompt what was blocked doesn't help. also tried with logging to console enabled and nothing there either.
tried a bunch of hacking around to get this to work, but the only fix is to temp allow the site which is no good since it needs to work with a multitude of sites. i've been unable to find exactly what option in NS is blocking this. domains changed in following code...
Code: Select all
javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://mysite.com/wp-admin/press-this.php',l=d.location,e=encodeURIComponent,g=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=2';function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=720,height=570')){l.href=g;}}setTimeout(a,0);void(0);Code: Select all
javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://mysite.com/wp-admin/press-this.php',l=d.location,e=encodeURIComponent,g=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=2';function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=720,height=570')){l.href=g;}};a();void(0);