Created
April 21, 2020 11:04
-
-
Save briantw/c8ad09f695d654aeb1131a19ab8360d9 to your computer and use it in GitHub Desktop.
Since WordPress removed the original bookmarklet functionality, I needed to make a plan to restore the functionality in my Chrome browser. Create a new bookmark, right-click, Edit..., paste the code in the URL field. Just replace yoursite.com with your Wordpress URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = 'https://yoursite.com/wp-admin/press-this.php', | |
l = d.location, | |
e = encodeURIComponent, | |
g = f + '?u=' + e(l.href) + '&t=' + e(d.title) + '&s=' + e(s) + '&url-scan-submit=Scan'; | |
function a() { | |
if (!w.open(g, 't', 'toolbar=1,resizable=1,scrollbars=1,status=1,left=480,width=960,height=800')) { | |
l.href = g; | |
} | |
} | |
setTimeout(a, 0); | |
void(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment