NicoJuicy / Handlr

Issue tracker for a DMS web application, currently in private beta
3 stars 0 forks source link

Submit post through a javascript or a custom browser extension #18

Closed NicoJuicy closed 7 years ago

NicoJuicy commented 10 years ago

Add something like the following, so it's easy to submit the current (viewing) tab to the application. Eg. for adding an article

javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://voor-de-zelfstandige.azurewebsites.net/wp-admin/press-this.php',l=d.location,e=encodeURIComponent,u=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=4';a=function(){if(!w.open(u,'t','toolbar=0,resizable=1,scrollbars=1,status=1,width=720,height=570'))l.href=u;};if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a();void(0)

The alternative would be to create a custom browser extension (a different plugin for every browser, inspired by HackerNews)