Project

General

Profile

Actions

Bug #9453

closed

Press This bookmarklet no longer works

Added by Raffi Khatchadourian about 6 years ago. Updated about 6 years ago.

Status:
Rejected
Priority name:
Normal
Assignee:
-
Category name:
-
Target version:
-
Start date:
2018-03-22
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

I've used the "Press This" boorkmarlet for a number of years now. Today, I noticed it's not working. Here's the message I am receiving:

The Press This plugin is required.
Press This is not installed. Please install Press This from the main site.

Here is the link of the bookmarklet:
javascript:(function(a,b,c,d)%7Bfunction e(a,c)%7Bif("undefined"!%3Dtypeof c)%7Bvar d%3Db.createElement("input")%3Bd.name%3Da,d.value%3Dc,d.type%3D"hidden",p.appendChild(d)%7D%7Dvar f,g,h,i,j,k,l,m,n,o%3Da.encodeURIComponent,p%3Db.createElement("form"),q%3Db.getElementsByTagName("head")%5B0%5D,r%3D"_press_this_app",s%3D!0%3Bif(d)%7Bif(!c.match(/%5Ehttps%3F:/))return void(top.location.href%3Dd)%3Bif(d%2B%3D"%26u%3D"%2Bo(c),c.match(/%5Ehttps:/)%26%26d.match(/%5Ehttp:/)%26%26(s%3D!1),a.getSelection%3Fh%3Da.getSelection()%2B"":b.getSelection%3Fh%3Db.getSelection()%2B"":b.selection%26%26(h%3Db.selection.createRange().text%7C%7C""),d%2B%3D"%26buster%3D"%2B(new Date).getTime(),s%7C%7C(b.title%26%26(d%2B%3D"%26t%3D"%2Bo(b.title.substr(0,256))),h%26%26(d%2B%3D"%26s%3D"%2Bo(h.substr(0,512)))),f%3Da.outerWidth%7C%7Cb.documentElement.clientWidth%7C%7C600,g%3Da.outerHeight%7C%7Cb.documentElement.clientHeight%7C%7C700,f%3D800>f%7C%7Cf>5e3%3F600:.7*f,g%3D800>g%7C%7Cg>3e3%3F700:.9*g,!s)return void a.open(d,r,"location,resizable,scrollbars,width%3D"%2Bf%2B",height%3D"%2Bg)%3B(c.match(/%5C/%5C/(www%7Cm)%5C.youtube%5C.com%5C/watch/)%7C%7Cc.match(/%5C/%5C/vimeo%5C.com%5C/(.%2B%5C/)%3F(%5B%5Cd%5D%2B)%24/)%7C%7Cc.match(/%5C/%5C/(www%5C.)%3Fdailymotion%5C.com%5C/video%5C/.%2B%24/)%7C%7Cc.match(/%5C/%5C/soundcloud%5C.com%5C/.%2B%24/)%7C%7Cc.match(/%5C/%5C/twitter%5C.com%5C/%5B%5E%5C/%5D%2B%5C/status%5C/%5B%5Cd%5D%2B%24/)%7C%7Cc.match(/%5C/%5C/vine%5C.co%5C/v%5C/%5B%5E%5C/%5D%2B/))%26%26e("_embeds%5B%5D",c),i%3Dq.getElementsByTagName("meta")%7C%7C%5B%5D%3Bfor(var t%3D0%3Bt<i.length%26%26!(t>200)%3Bt%2B%2B)%7Bvar u%3Di%5Bt%5D,v%3Du.getAttribute("name"),w%3Du.getAttribute("property"),x%3Du.getAttribute("content")%3Bx%26%26(v%3Fe("_meta%5B"%2Bv%2B"%5D",x):w%26%26e("_meta%5B"%2Bw%2B"%5D",x))%7Dj%3Dq.getElementsByTagName("link")%7C%7C%5B%5D%3Bfor(var y%3D0%3By<j.length%26%26!(y>%3D50)%3By%2B%2B)%7Bvar z%3Dj%5By%5D,A%3Dz.getAttribute("rel")%3B("canonical"%3D%3D%3DA%7C%7C"icon"%3D%3D%3DA%7C%7C"shortlink"%3D%3D%3DA)%26%26e("_links%5B"%2BA%2B"%5D",z.getAttribute("href"))%7Db.body.getElementsByClassName%26%26(k%3Db.body.getElementsByClassName("hfeed")%5B0%5D),k%3Db.getElementById("content")%7C%7Ck%7C%7Cb.body,l%3Dk.getElementsByTagName("img")%7C%7C%5B%5D%3Bfor(var B%3D0%3BB<l.length%26%26!(B>%3D100)%3BB%2B%2B)n%3Dl%5BB%5D,n.src.indexOf("avatar")>-1%7C%7Cn.className.indexOf("avatar")>-1%7C%7Cn.width%26%26n.width<256%7C%7Cn.height%26%26n.height<128%7C%7Ce("_images%5B%5D",n.src)%3Bm%3Db.body.getElementsByTagName("iframe")%7C%7C%5B%5D%3Bfor(var C%3D0%3BC<m.length%26%26!(C>%3D50)%3BC%2B%2B)e("_embeds%5B%5D",m%5BC%5D.src)%3Bb.title%26%26e("t",b.title),h%26%26e("s",h),p.setAttribute("method","POST"),p.setAttribute("action",d),p.setAttribute("target",r),p.setAttribute("style","display: none%3B"),a.open("about:blank",r,"location,resizable,scrollbars,width%3D"%2Bf%2B",height%3D"%2Bg),b.body.appendChild(p),p.submit()%7D%7D)(window,document,top.location.href,"https:%5C/%5C/khatchad.commons.gc.cuny.edu%5C/wp-admin%5C/press-this.php%3Fv%3D8")%3B

Actions #1

Updated by Raffi Khatchadourian about 6 years ago

Hm, I just updated it and now it works. Here's the new link:
javascript:( function (e){var t=document,n=window,s=n.getSelection,o=t.getSelection,i=t.selection,r=t.location,a=void 0;a=s?s():o?o():i?i.createRange().text:0;var l=e+"?url="+encodeURIComponent(r.href)+"&title="+encodeURIComponent(t.title)+"&text="+encodeURIComponent(a)+"&v=5",c=function(){n.open(l,"t","toolbar=0,resizable=1,scrollbars=1,status=1,width=660,height=570")||(r.href=l)};/Firefox/.test(navigator.userAgent)?setTimeout(c,0):c()} )( 'https://wordpress.com/post/khatchad.commons.gc.cuny.edu' )

Actions #2

Updated by Boone Gorges about 6 years ago

Press This functionality has changed over the last few versions of WordPress. See https://wptavern.com/press-this-removed-from-wordpress-4-9-in-favor-of-a-plugin and https://make.wordpress.org/core/2017/11/02/press-this-in-4-9/ The plugin version doesn't have bookmarklet functionality, I guess for security reasons.

It is odd that you were able to use the bookmarklet after updating the code. Where'd you get the new bookmarklet? I see it points to wordpress.com - is it a Jetpack feature?

Actions #3

Updated by Raffi Khatchadourian about 6 years ago

Boone Gorges wrote:

...
It is odd that you were able to use the bookmarklet after updating the code. Where'd you get the new bookmarklet? I see it points to wordpress.com - is it a Jetpack feature?

I got it from the settings page on wordpress.com. Yeah, I guess it's a Jetpack feature.

Actions #4

Updated by Boone Gorges about 6 years ago

  • Status changed from New to Rejected

Thanks for confirming, Raffi. I think there's nothing that the Commons can do, then - not only because it's Jetpack, but because the bookmarklet is something that users control, not us.

Actions #5

Updated by Raffi Khatchadourian about 6 years ago

Boone Gorges wrote:

Thanks for confirming, Raffi. I think there's nothing that the Commons can do, then - not only because it's Jetpack, but because the bookmarklet is something that users control, not us.

Thanks, Boone. Would it be worth it to install the press this plugin?

Actions

Also available in: Atom PDF