Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore Bookmarklet Functionality #15

Closed
kraftbj opened this issue Nov 2, 2017 · 67 comments

Comments

Projects
None yet
@kraftbj
Copy link
Collaborator

commented Nov 2, 2017

This issue is for conversation regarding restoring the bookmarklet functionality. This is not something I consider as on the roadmap at all, but I do want to promote open dialogue and discussion. I'd like to centralize the conversation here vs other Trac tickets, p2 comments, other blog posts, etc.

@kraftbj kraftbj added the question label Nov 2, 2017

@svandragt

This comment has been minimized.

Copy link

commented Nov 3, 2017

For our understanding, what is the workflow without the bookmarklet? Thanks.

@kraftbj

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 3, 2017

As it stands, copy an URL, visit press-this.php, paste the URL and click the button to parse it.

Instead of a bookmarklet, this is ripe territory for a browser extension IMO.

@jpluimers

This comment has been minimized.

Copy link

commented Nov 3, 2017

I'm really disappointed that without warning to payed WordPress.com Premium subscribers, the bookmarklet functionality was removed without up-front warning and no more information than the popup The WordPress bookmarklet was deprecated. Please delete it from your web browser.

It took me about half an hour of chatting with support to find what changed and where to direct input to: this issue. Writing this comment took more than an hour.

I'd appreciate restoring the bookmarklet functionality until bugs in the new implementation are fleshed out.

Writing posts already takes me about 3 hours a day and doing that in an efficient manner is crucial for my work flow: the blog is basically an on-line search-engine indexed "memory" with truckloads of external references, each one by now duplicated because I archive anything relevant to it in either the WayBack machine or Archive.is because of link rot.

The new workflow should have the same functionality in the same or less steps than the old workflow.

The past workflow (which worked until about 12 hours ago) was this:

  1. Visit a URL
  2. Click the "Press This" bookmarklet
  3. Add any images relevant to he post
  4. Edit bits of the content and generated link
  5. Save draft and continue at a later stage

No I'm trying to replace step 2. by clicking on the "Press This!" bookmark that points to https://wiert.wordpress.com/wp-admin/press-this.php

For the majority of the sites, visiting https://wiert.wordpress.com/wp-admin/press-this.php will not grab the URL, nor will pasting a copied URL.

Having to paste the URL is already a two step process taking valuable time and mouse/keyboard handling.

Examples URLs that fail initially (I've not checked images, they seem to succeed even less often than getting link or title correctly):

The above are just a fraction of the sites my blog (7k+ scheduled posts in 8 years of writing) is referencing.

Most of the above used to work fine with the most recent "Press This" bookmarklet or with an older version (I think v4) of that bookmarklet.

Both bookmarklet versions worked next to each other for a very long time (far more than a year), so I do not understand why the bookmarklet and the new link cannot be supported next to each other for at least a year or so.

@chazzzzy

This comment has been minimized.

Copy link

commented Nov 4, 2017

It's really bizarre that the bookmarklet function is being removed as every single social media service out there has an easy way to share articles and the Press This bookmarklet was Wordpress's answer to sharing articles on your blog via press this.

Telling a user to copy a URL and then paste it is like telling someone to set the clock on their old-school VCR.. it's just not going to happen. It's a shame that this functionality is being taken away without any discussion and there is really no reason to remove it since it doesn't hog any resources.

I build a whole website around using Press This underground.net to share articles and comment on them and now all my work has to be thrown away since people are not going to (let alone know how to) copy URLs and paste them into fields, especially on mobile phones.

@chazzzzy

This comment has been minimized.

Copy link

commented Nov 9, 2017

@kraftbj I like the idea of a browser extension.. But, I guess unique ones will have to be made for each browser and for each website?

@kraftbj

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 9, 2017

There would need to be unique ones for browsers, but I anticipate only one will be needed with a config option to specify site(s).

@lkraav

This comment has been minimized.

Copy link

commented Nov 16, 2017

WebExtensions, a new browser extension API; a cross-browser system for developing extensions, perhaps alleviates this process somewhat? I'm also in agreemnet, that the bookmarklet was massively convenient but I've been following the Firefox bugzilla issue about bookmarklets simply not working due to modern security restrictions, and tl;dr there's no way to bring them back.

@jpluimers

This comment has been minimized.

Copy link

commented Nov 16, 2017

@lkraav: out of curiosity, do you have a link to that issue?

@stvrbbns

This comment has been minimized.

Copy link

commented Nov 16, 2017

I updated to 4.9 and encountered this issue (deprecated bookmarklet).
+1 "Hey, I was using that."

@kraftbj Thanks for commenting on where this discussion should take place.

Yes, bookmarklets are becoming rare, but it is a tool which is not currently trivially replaced. On the one hand, it is more secure; one the other hand, it turns [left-click-bookmark] into [ctrl+left-click-bookmark > left-click-address-bar > ctrl+a > ctrl+c > left-click-new-tab > left-click-url-scan-field > ctrl+v > left-click-scan-button] -- a 700% increase in required user actions, half of which require a modification key to be held. There has got to be a better way.

@lkraav

This comment has been minimized.

Copy link

commented Nov 16, 2017

out of curiosity, do you have a link to that issue?

@jpluimers https://bugzilla.mozilla.org/show_bug.cgi?id=866522

@kwoodall

This comment has been minimized.

Copy link

commented Nov 17, 2017

I strongly encourage the authors to restore the bookmarklet functionality. You have to have realized by now that the bookmarklet was the core functionality of PRESS THIS for so many of it's users.

@kwoodall

This comment has been minimized.

Copy link

commented Nov 17, 2017

Kraftbj - one problem with your idea of a browser extension is that it almost certainly will expect people to be linking it to their Site. Singular. In my case, I was using Press This to aggregate news content for three blogs.

Another point made elsewhere... why did you depreciate this without warning? Typically WordPress does not depreciate a feature/api/etc without a huge amount of warning.

@kraftbj

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 17, 2017

@kwoodall A browser extension can be setup to work with multiple sites. A similar idea off the top of my head is the Google Docs Publish to WordPress add-on that allows someone to push to a draft a Google Doc on any WordPress.com or Jetpack site they enabled. A similar framework would work -- click the extension icon, hit the site you want to press to, etc.

@kwoodall

This comment has been minimized.

Copy link

commented Nov 17, 2017

@kraftbj My point is that a browser extension isn't usually setup that way - and in fact, there IS a Chrome browser extension for posting to WordPress which is buggy, and doesn't offer a good feature set, and even if it did work - it's single site only.

But the bigger issue is that crucial functionality has been removed without regard to the userbase of Press This. Based on reading comments here and other forums I would estimate at least several hundred users minimum have been adversely affected by this change (but it could easily be tens of thousands). The worst part is there is no reason for this.

@samsarmad

This comment has been minimized.

Copy link

commented Nov 17, 2017

And the previous versions do not week either so downversioning the plugin does not work. Pretty lame ... I thought only Microsoft did stuff like this :)

@kraftbj

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 17, 2017

@samsarmad WordPress 4.8.3 is not impacted; downgrading to that would restore functionality at this moment. This plugin (in this form) didn't exist before now. The previous versions in the w.org SVN were for using the experimental version with the development version of WordPress between 4.1 and 4.2.

@samsarmad

This comment has been minimized.

Copy link

commented Nov 17, 2017

@kraftbj I was referring to dev 0.0.4.3 at https://wordpress.org/plugins/press-this/advanced/ which I assumed was what had a functional bookmarklet.

It seems the issue is not just PressThis but WordPress 4.9. Were there only technical or other concerns?

Downgrading WP to 4.8.3 is an option but bears more risks with security and other plugins.

@flexseth

This comment has been minimized.

Copy link

commented Nov 17, 2017

In my opinion, this is a slippery slope to making WordPress do less stuff, because we can't get WordPress, or the WordPress user base, to securely do the stuff that we as developers pride ourselves in saying "Yes, you can do that with WordPress!"

I used this bookmarklet every day for three years, to a substantial revenue stream, even modifying the plugin to add custom post types. Maybe this is more opinion based, but the mantra that in order to be secure, we have to do less... I just feel that we can come up with a better way to go.

To be completely honest, I think the idea of removing the bookmarklet most likely came from folks who never had the joy of using this functionality. Folks who didn't generate revenue directly with this bookmarklet. For some of us, this bookmarklet provided extra sleep at night.

So, save any technical stuff, in terms of overall direction for the WordPress platform, I think this is a critical point where we have to understand that security is always going to be a concern, and to work within those parameters to do things securely, in lieu of doing less.

@kwoodall

This comment has been minimized.

Copy link

commented Nov 17, 2017

@flexseth Do you think you're up to forking and restoring the bookmarklet to this?

@samsarmad

This comment has been minimized.

Copy link

commented Nov 17, 2017

Why would the bookmarklet be a security issue? The current copy paste URL functionality has the exact same security architecture minus auto-filling the url.

@flexseth

This comment has been minimized.

Copy link

commented Nov 18, 2017

@samsarmad the original WP Tavern post stated that it was removed due to a security issue.

@kwoodall I really couldn't pick up anything extra right now, I'd prefer to see it left as is
_" as is " ish. Put the code somewhere that developers can access it. Check out the P2 + o2 theme .. hidden gem for project management on the low from Automattic

edit: don't like the idea of using a browser extension to do something I can do with WordPress

edit 2: Maybe actually improve the bookmarklet, and promote it via the community. The only thing I could think of is web scraping implications that are of a legal concern, as a reason to remove this

@samsarmad

This comment has been minimized.

Copy link

commented Nov 18, 2017

Now aside from why, what is there to stop anyone from creating a bookmarklet that populates the URL field post loading? I have not looked at JS for ages but all needs to get done is set the u attribute of page. Trivial to do and it bypasses the plugin. The old bookmarklet JS:

javascript:(function(a,b,c,d){function e(a,c){if("undefined"!=typeof c){var d=b.createElement("input");d.name=a,d.value=c,d.type="hidden",p.appendChild(d)}}var f,g,h,i,j,k,l,m,n,o=a.encodeURIComponent,p=b.createElement("form"),q=b.getElementsByTagName("head")[0],r="_press_this_app",s=!0;if(d){if(!c.match(/^https?:/))return void(top.location.href=d);if(d+="&u="+o(c),c.match(/^https:/)&&d.match(/^http:/)&&(s=!1),a.getSelection?h=a.getSelection()+"":b.getSelection?h=b.getSelection()+"":b.selection&&(h=b.selection.createRange().text||""),d+="&buster="+(new Date).getTime(),s||(b.title&&(d+="&t="+o(b.title.substr(0,256))),h&&(d+="&s="+o(h.substr(0,512)))),f=a.outerWidth||b.documentElement.clientWidth||600,g=a.outerHeight||b.documentElement.clientHeight||700,f=800>f||f>5e3?600:.7f,g=800>g||g>3e3?700:.9g,!s)return void a.open(d,r,"location,resizable,scrollbars,width="+f+",height="+g);i=q.getElementsByTagName("meta")||[];for(var t=0;t<i.length&&!(t>200);t++){var u=i[t],v=u.getAttribute("name"),w=u.getAttribute("property"),x=u.getAttribute("content");x&&(v?e("_meta["+v+"]",x):w&&e("_meta["+w+"]",x))}j=q.getElementsByTagName("link")||[];for(var y=0;y<j.length&&!(y>=50);y++){var z=j[y],A=z.getAttribute("rel");"canonical"!==A&&"icon"!==A&&"shortlink"!==A||e("_links["+A+"]",z.getAttribute("href"))}b.body.getElementsByClassName&&(k=b.body.getElementsByClassName("hfeed")[0]),k=b.getElementById("content")||k||b.body,l=k.getElementsByTagName("img")||[];for(var B=0;B<l.length&&!(B>=100);B++)n=l[B],n.src.indexOf("avatar")>-1||n.className.indexOf("avatar")>-1||n.width&&n.width<256||n.height&&n.height<128||e("_images[]",n.src);m=b.body.getElementsByTagName("iframe")||[];for(var C=0;C<m.length&&!(C>=50);C++)e("_embeds[]",m[C].src);b.title&&e("t",b.title),h&&e("s",h),p.setAttribute("method","POST"),p.setAttribute("action",d),p.setAttribute("target",r),p.setAttribute("style","display: none;"),a.open("about:blank",r,"location,resizable,scrollbars,width="+f+",height="+g),b.body.appendChild(p),p.submit()}})(window,document,top.location.href,"https://WORDPRESSSITEURL/wp-admin/press-this.php?v=8");

@flexseth

This comment has been minimized.

Copy link

commented Nov 18, 2017

@samsarmad my thing is, someone already created that. Anyways, hopefully they decide to keep this feature

@1tg1

This comment has been minimized.

Copy link

commented Nov 18, 2017

BRING BACK THIS BOOKMARKLET! THEY'VE RUINED WORDPRESS!

@kraftbj

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 18, 2017

Thanks everyone for sharing your thoughts and feedback. I appreciate that the overall tone has been productive and looking toward solutions for the need. My only ask is that it remains that way. I love Press This—and why I worked on the 4.2-era completely-rewritten version of press-this.php. I use it frequently. I absolutely appreciate the situation folks were in when being surprised after upgrading to 4.9. The decision wasn't made lightly or by folks who were ignorant of Press This.

I still maintain that the best way to restore the functionality is by offloading it to a browser extension. If anyone is game to work on that, let's get going on that. I'm happy to publish a make/core post asking for help and seeing what we can build together.

For the record, an easier-to-read version of the bookmarklet code from 4.8.3 can be seen at https://core.trac.wordpress.org/browser/tags/4.8.3/src/wp-admin/js/bookmarklet.js

Lastly, I'm taking a long-delayed break-from-technology next week as part of the U.S. Thanksgiving holiday and will not be monitoring this thread (or any electronic communication). I appreciate your patience in advance and will revisit this thread as soon as I return.

@quoderat

This comment has been minimized.

Copy link

commented Nov 18, 2017

This is unbelievable. It's hard to resist the urge spew invective into this post as this decision was taken without warning and removes vital functionality for many people.

This is the main functionality I used on Wordpress, and without it I will not be able to continue my blog as I just won't have time to do so. My time is tight as it is already, and the new "workflow" is so awkward that it is nearly impossible to use.

In the next few days, I will be considering deleting my linkblog, and considering deleting my other blog in protest. At the least, I will never use nor recommend Wordpress to anyone over this user-hostile change.

This is just unacceptable and harms your users. Shame on the team that had anything to do with this for caving to security freakery over functionality and user control.

@samsarmad

This comment has been minimized.

Copy link

commented Nov 18, 2017

While an inconvenience, there is a one more tab switch, ctl-c, ctl-v effort; hardly a reason to delete a whole blog. Have a programmer look at his code above and modify it in a few minutes. He is not doing it for his reasons but it is doable.

@quoderat

This comment has been minimized.

Copy link

commented Nov 18, 2017

It takes me a few minutes longer per post, especially since the parsing of URLs seems to be worse. Before, it only took a few seconds. I made sometimes more than a dozen posts a day. I have a very busy life. I simply do not have time to make the additional effort, nor do I wish to do so.

@jpluimers

This comment has been minimized.

Copy link

commented Nov 22, 2017

@kwoodall for wordpress.com users like me who cannot install plugins: do you have any plans to post your changes as a pull-request to this repository?

@kwoodall

This comment has been minimized.

Copy link

commented Nov 22, 2017

I don't personally plan to do that but don't mind if someone else does.

@1tg1

This comment has been minimized.

Copy link

commented Nov 23, 2017

Thanks @kwoodall excellent job!
Not related, but do you have/know of a good @mention plugin for wordpress?

@eliasgomezsainz

This comment has been minimized.

Copy link

commented Nov 23, 2017

The only remaining feature is the scanner, that could be perfectly on the New Post screen. But now we can't:

  • Curate content with just one click (the most important)
  • Quote text from the source page
  • I click on "Standard editor" and does not work
  • I'm sure we have lost more, but not aware now
@BiMeWe

This comment has been minimized.

Copy link

commented Nov 23, 2017

@chazzzzy regarding Press This Restored! from @kwoodall

post this code to github here as a fork

Given the comment of Matt Mullenweg why not bring this into the "official" Press This plugin. I hope @kraftbj and @wordpressdotorg not only agree but also support this actively. Thanks for any step further to overcome this disruption.

@Pathduck

This comment has been minimized.

Copy link

commented Nov 23, 2017

@kwoodall 👍 Thanks so much, it works fine. Just today I was going to post a URL and went WTF happened to Press This? No idea why they removed this and just added a mostly useless new plugin.

@knutsp

This comment has been minimized.

Copy link

commented Nov 23, 2017

@kraftbj What is it about Press This that you love?

@chazzzzy

This comment has been minimized.

Copy link

commented Nov 23, 2017

@BiMeWe I actually

posted the code to GitHub here as a fork Different location...

Because @MichaelArestad 's code is about 5 years old.

I already detected one thing that's changed.. the function get_shortcut_link() is missing. It was just coded into the toolbar bookmarklet of the restored plugin. I was referencing that shortcut_link elsewhere in my site. I'll see if I can figure out how to bring it back. Though everything seems to work fine with the current code.

@kwoodall

This comment has been minimized.

Copy link

commented Nov 23, 2017

@jpluimers

This comment has been minimized.

Copy link

commented Nov 24, 2017

@kwoodall please make that a separate issue as it is very useful.

@kwoodall

This comment has been minimized.

Copy link

commented Nov 24, 2017

@jpluimers ...you forget that I'm a Gitidiot - how do I do that?

@samsarmad

This comment has been minimized.

Copy link

commented Nov 25, 2017

@chazzzzy can you enable issues so the recommendations can be added and tracked? Thanks.

@kraftbj kraftbj added bug and removed question labels Nov 25, 2017

@kraftbj

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 25, 2017

Howdy y’all!

As I mentioned above, I was totally disconnected this last week for a family vacation. During that time, the conversation shifted here and on the make/core post. Following the decision of @m, I’ll work to add the original bookmarklet feature into the plugin until at least the time there is a reasonable cross-browser alternate.

@kwoodall and others putting code together, please do create pull requests here. We can not suggest or recommend other plugins not hosted on w.org’s repo as we can’t vouch for them or have a way to work with plugin developers if there is a problem.

Thanks everyone for the dialogue and conversation.

@chazzzzy

This comment has been minimized.

Copy link

commented Nov 25, 2017

@kraftbj that is fantastic, thanks so much!

@jpluimers

This comment has been minimized.

Copy link

commented Nov 25, 2017

@kraftbj Thanks a lot. If I can be of help, let me know. I don't run WordPress myself, but my blog is hosted by WordPress.com and I can setup a VM or Raspberry Pi with a recent openSUSE edition to test with.

Even though I'm a back-end developer by nature, I do have quite some UX and testing experience.

Oh: welcome back from holiday. I hope you had a good one. Offline periods of time usually are very inspirational (:

@samsarmad

This comment has been minimized.

Copy link

commented Nov 25, 2017

@kraftbj thanks!

kraftbj added a commit that referenced this issue Nov 27, 2017

@kraftbj

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 28, 2017

@jpluimers Thanks for the offer! I pushed the restored version to WordPress.com a few minutes ago. Can you give it a look when you have a chance? You should see the bookmarklet link back at wp-admin/tools.php and the bookmarklet should work again.

@kwoodall

This comment has been minimized.

Copy link

commented Nov 28, 2017

@kraftbj kraftbj closed this in #29 Nov 28, 2017

@kraftbj kraftbj added this to the 1.1.0 milestone Nov 28, 2017

@kraftbj

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 28, 2017

@kwoodall I checked it out. I ended up restoring it closer to the original implementation to minimize the potential breakage. I have a separate fork in play to improve the bookmarklet a tad.

@kwoodall

This comment has been minimized.

Copy link

commented Nov 28, 2017

@jpluimers

This comment has been minimized.

Copy link

commented Nov 29, 2017

@kraftbj I saw it in #17 (comment), so the repeat here:

Thanks. Tested with https://wordpress.com/post/wiert.me ... and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.