Skip to content

Instantly share code, notes, and snippets.

@pixelinpink
Forked from kentbrew/pinmarklet.md
Created May 25, 2021 19:03
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 pixelinpink/7961a5a14e155ab5b576c5dd530f02b4 to your computer and use it in GitHub Desktop.
Save pixelinpink/7961a5a14e155ab5b576c5dd530f02b4 to your computer and use it in GitHub Desktop.
How to recreate your long-lost Pinterest bookmarklet.

How to recreate your long-lost Pinterest bookmarklet.

Right-click your bookmarks bar and choose Add Page (Chrome) or New Bookmarklet (Firefox).

In Name, put this:

Pin It

In URL, put this:

javascript:void((function(d){d.addEventListener('securitypolicyviolation',function(r){alert('ContentSecurityPolicyError!');});e=d.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('debug','true');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+(Math.random()*99999999));d.body.appendChild(e);}(document)));

For My Little Friend Safari:

  • open about:blank in a new window (this will help you not have to mess around with favicons later)
  • hit command-D
  • choose Favorites under Add this page to:
  • enter Pin It in the Name box
  • right-click the Pin It bookmarklet you just made and choose Edit Address
  • paste in the JavaScript from above

If You're Running Chrome or Firefox, Pinmarklet will Bother You to Install the Pinterest Browser Extension

  • From time to time you'll see a big banner in the image grid, begging you to please install the extension.
  • If you don't want to install the extension, click the "no, thanks" button to set a two-week cookie.

Why you Might Want the Extension After All

  • Pinning with the extension is much better, especially if you pin a lot. You'll have free hovering Save buttons (which you can turn off in Settings) and you can right-click and pin an image without the intervening wait-for-the-grid / pick-an-image cycle.
  • Pinning happens right there inline instead of in a pop-up window.
  • You also get Visual Search for free. Right-click the body of the page to search a full screenshot, or choose the hovering selector button to search an individual image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment