Remove "Picked for you" pins from Pinterest.

Update: Pinterest now lets you disable Picked For You pins! Go to your profile, then press the settings button (a hexagonal bolt). Scroll down to "Home feed", then switch 'Show "Picked for you" Pins in your home feed' to 'No'.

Thank you all for your kind comments and bug fixing for this script. I hope it was useful.
Remove Picked For You pins from Pinterest
It's no secret that I love Pinterest more than is really okay. They've started doing this thing where they show you "Picked for you" pins on your homepage, interspersed with your friends' pins. I quite like the curated pins they choose, but sometimes I like to just see what my friends have been up to.

You have the option to go through and deselect all of your boards, which I assume would prevent you from getting "Picked for you" pins at all. However, I wanted something a little less permanent, so I've made a bookmarklet.

The easiest way to use it is to drag the following link onto your bookmarks toolbar:

Remove Picked For You

Then, if you go to pinterest.com and click on your new bookmark, the "Picked for you" and "Promoted by" pins will have disappeared.

To keep the pins hidden, you have to click on the bookmark every time you load the page. However, there's a browser add-on for Firefox (or Iceweasel) called Greasemonkey, which lets you run little bits of javascript all the time. First, install Greasemonkey. Then, copy the text below:

// ==UserScript==
// @name        Remove Picked For You
// @namespace   bethmcmillan.com
// @include     *
// @version     2
// @grant       none
// ==/UserScript==

function hide_picked_for_you() {
divs=document.getElementsByClassName("creditFooter");
  for(i=0;i<divs.length;i++)
  {if (divs[i].innerHTML.indexOf('Picked for') != -1)
  {divs[i].parentNode.parentNode.parentNode.style.visibility='hidden';}
  }
divs=document.getElementsByClassName('creditName');
  for(i=0;i<divs.length;i++)
  {if (divs[i].innerHTML.indexOf('Promoted') != -1)
  {divs[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.visibility='hidden';}
  }
}

window.setInterval(function(){
  hide_picked_for_you();
}, (5000));

Next, click on the Greasemonkey icon in your browser (usually in the top right), go to "New User Script", then "Use Script From Clipboard". Now, when you go to Pinterest and click on the Greasemonkey icon again, there should be the option "Remove Picked For You". If you tick it, you'll see that the pins disappear. For Google Chrome, there's an extension called Tampermonkey, which works in the same way.

If the script or bookmark aren't working for you, try reinstalling them from this page, as I might have updated the code. If this doesn't fix it, tell me in the comments. The latest code is always available on Github.

...

Adventures in bookmarklet land

Do you use bookmarklets? They're little bits of javascript that you save as bookmarks, that do something to the page you're on when you click on them. Today I made a bookmarklet to change the formatting on any Project Gutenberg HTML book.

To see it in action, drag this link to your bookmarks bar: Format Gutenberg - then go to any Project Gutenberg book as an HTML page - try this one to begin with - then scroll down to the main text and click on your bookmarklet.

A bit of background:

I read and wrote a lot of fanfiction as a teenager, and (I suppose largely out of nostalgia) have some particular preferences about text formatting. Nowadays, I find 13px Verdana on a white background, with minimal margins and no indenting, to be the easiest to concentrate on. People talk a lot about how it's difficult to read from a computer screen (hence the rise of e-ink) but personally I suspect it's easier for me to read fiction when it's just another tab on my browser. Project Gutenberg is a massive online library of out-of-copyright literature.

I'm moving house this weekend, my exams start this Wednesday and in general, I'm pretty stressed out. I'm having a quiet evening watching comedy with my brother Pete and, as usual when I'm under pressure, obsessively coding. I've always thought bookmarklets were pretty cool (if fairly mysterious), so I had a look at some source code and had a go at working it out (I'm sure there are lots of tutorials on the internet, but I was looking for a puzzle).

My general strategy and some code: Continue reading Adventures in bookmarklet land

...