Creating bookmarklets to speed up workflows

I hate to waste time and love shortcuts to get things done faster. Especially things I routinely do.

Enter bookmarklets.

Bookmarklets are a lot like bookmarks on your browser except that they are a short snippet of code that will run some sort of function for you. They may take you to another destination, but also might fill in information for you on that destination.

They also might run the script right on the page you are on.

What am I talking about?

Have you ever been on a page or site and wanted to see the Semrush data for that page? You have to copy the URL, go to Semrush, and then paste it in. Not with a bookmarklet. Instead, you just click a button.

I’ve collected a bunch of these over the years. I’m going to share some common bookmarklets I use that I think most people might find useful, but there are tons of possibilities for you to create your own once you see how easy it is.

How do you create a bookmarklet?

It’s really simple.

In Google Chrome, first bookmark a page. Any page. It does not matter what page. Save it to the bookmarks bar. Now right click on it and select edit. You can change the name of it and for the URL you are going to paste a script in that field.

For the one I mentioned above and the one included in the GIF of this post, use this:

javascript:location.href='https://www.semrush.com/info/'+window.location.href

Now go to any URL you want. Then hit your new bookmarklet button in your browser.

It will take you right to Semrush to view the data on that URL.

Here are a few other common ones you can use.

Want to view your URL in Google Pagespeed Insights? Use this code to create another bookmarklet:

javascript:location.href='https://developers.google.com/speed/pagespeed/insights/?url=%27+window.location

Ever want to extract just the URLs on a SERP page? I think I got this one some time ago from Glen Allsopp, so credit goes to him.

javascript:var a = document.getElementsByTagName('a'), arr = '';for(var i=0; i<a.length; i++) if (a[i].ping && !a[i].href.includes('google'))arr +=('' + a[i].href + '');var newWindow = window.open();newWindow.document.write(arr);newWindow.document.close();

Go to any SERP and run this bookmarklet. It will pull all the URLs. The downside is that it includes ads, local results, and stuff like People also ask, so you may need to clean up the results a little bit for whatever you want to use it for.

Want to find all of the nofollow links on a page?

javascript:var a = document.getElementsByTagName('a');for(var i=0; i<a.length; i++)if (a[i].rel === 'nofollow') {a[i].style.backgroundColor = 'yellow';}

This bookmarklet will highlight them all yellow.

Want to know if a page is mobile friendly? Run it through Google’s mobile friendly checker with the click of a button.

javascript:location.href='https://search.google.com/test/mobile-friendly?url=%27+window.location

Want to test the structured data of a page? Here you go.

javascript:location.href='https://search.google.com/structured-data/testing-tool/u/0/#url='+window.location

This will run whatever page you are on through Google’s structured data tester.

You can take a look at these codes and come up with ideas of your own to create your own bookmarklets, often by just replacing the URLs in the code with the destination you want to go to.

Tools I Use:

🔎  SemrushCompetitor and Keyword Analysis

✔  Monday.comFor task management and organizing all of my client work

🗄  FraseContent optimization and article briefs

📆 Akiflow – Manage your calendar and daily tasks

👑  ContentKing AppSite crawler, monitoring, and audit tool

📈 SEOPress – It’s like Yoast, if Yoast wasn’t such a mess.

Sign Up So You Don't Miss the Next One:

vector representation of computers with data graphs
Subscription Form

Past tips you may have missed...