Skip to content

Instantly share code, notes, and snippets.

@jpluimers
Last active November 8, 2017 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpluimers/e72f6092fb33f55125a80bbd507058e3 to your computer and use it in GitHub Desktop.
Save jpluimers/e72f6092fb33f55125a80bbd507058e3 to your computer and use it in GitHub Desktop.
Some notes on "The WordPress bookmarklet was deprecated. Please delete it from your web browser." because the `/wp-admin/press-this.php` based URLs look very similar.

Since a few days, without announcing it to their paid users (for instance through en.blog.wordpress.com), WordPress.com has killed the "Press-This" bookmarklet button functionality.

Now you have to:

  1. Navigate to the page you want to write about
  2. Copy the URL
  3. Go to the /wp-admin/press-this.php on your blog (in my case https://wiert.wordpress.com/wp-admin/press-this.php)
  4. Wait for the page render
  5. Paste the URL
  6. Press Enter
  7. Wait for the page to re-render
  8. Start writing

The past bookmarklet behaviour was this:

  1. Navigate to the page you want to write about
  2. Click the Press-This bookmarklet
  3. Wait for the page to render
  4. Start writing

So the process takes twice the number of steps, and requires you to remember to copy/paste the URL, so in practice the new behaviour comes down to a process that takes 3 times as long:

  1. Navigate to the page you want to write about
  2. Go to the /wp-admin/press-this.php on your blog (in my case https://wiert.wordpress.com/wp-admin/press-this.php)
  3. Wait for the page render
  4. Remember you forgot to copy the URL
  5. Hit the back-button
  6. Wait for the page render
  7. Copy the URL
  8. Go to the /wp-admin/press-this.php on your blog
  9. Wait for the page render
  10. Paste the URL
  11. Press Enter
  12. Wait for the page to re-render
  13. Start writing

Below are some notes on the new and old situation because the /wp-admin/press-this.php based URLs look very similar.

I've mangled the parameter values for _wpnonce and buster to prevent potential abuse.

URLs of the new "enter URL to scan" functionality and the old bookmarklets to blog about https://support.signal.org/hc/en-us/articles/214507138-How-do-I-install-Signal-Desktop-

Below are the same URLs, but with the parameters spread over new lines for comparison.

  • "enter URL to scan":
https://wiert.wordpress.com/wp-admin/press-this.php
?u=https%3A%2F%2Fsupport.signal.org%2Fhc%2Fen-us%2Farticles%2F214507138-How-do-I-install-Signal-Desktop-
&url-scan-submit=Scan
&_wpnonce=1234567890
&_wp_http_referer=%2Fwp-admin%2Fpress-this.php
  • Bookmarklet V8:
https://wiert.wordpress.com/wp-admin/press-this.php
?v=8
&u=https%3A%2F%2Fsupport.signal.org%2Fhc%2Fen-us%2Farticles%2F214507138-How-do-I-install-Signal-Desktop-
&buster=123456789abcd
  • Bookmarklet V4:
https://wiert.wordpress.com/wp-admin/press-this.php
?u=https%3A%2F%2Fsupport.signal.org%2Fhc%2Fen-us%2Farticles%2F214507138-How-do-I-install-Signal-Desktop-
&t=How%20do%20I%20install%20Signal%20Desktop%3F%20%E2%80%93%20Support
&s=
&v=4

HTML fragment of the "enter URL to scan" functionality part of the page (it is called scanbar):

	<div id="scanbar" class="scan">
		<form method="GET">
			<label for="url-scan" class="screen-reader-text">Scan site for content</label>
			<input type="url" name="u" id="url-scan" class="scan-url" value="" placeholder="Enter a URL to scan" />
			<input type="submit" name="url-scan-submit" id="url-scan-submit" class="scan-submit" value="Scan" />
			<input type="hidden" id="_wpnonce" name="_wpnonce" value="1234567890" /><input type="hidden" name="_wp_http_referer" value="/wp-admin/press-this.php" />		</form>
	</div>

It appears that if you submit an empty or invalid _wpnonce value through a /wp-admin/press-this.php based URL, then the page will display just like the below HTML fragment.

The exception is a parameterless /wp-admin/press-this.php URL that does give a "Press-This" page with empty fields ready to start writing a fresh post.

<html><head><style type="text/css">
:root #mn div[style="position:relative"] > #center_col > div > ._dPg,
:root #mn div[style="position:relative"] > #center_col > ._Ak,
:root #mn #center_col > div > h2.spon:first-child + ol:last-child,
:root #mn #center_col > div > h2.spon:first-child,
:root #content > #right > .dose > .dosesingle,
:root #content > #center > .dose > .dosesingle
{ display: none !important; }</style></head><body><div class="error"><p>
						The WordPress bookmarklet was deprecated. Please delete it from your web browser.					</p></div>
					</body></html>

It renders as The WordPress bookmarklet was deprecated. Please delete it from your web browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment