javascript:(function(){{var s=window.location.href.toString();var p=/\/(%3F:title|name)\/([a-zA-Z0-9])+\//gi;if(p.test(s)){try{var n=s.match(p)[0].split("\/")[2];window.open('http://letterboxd.com/imdb/'+n);}catch(e){}}};void(0);})();
My version:
javascript:(function(){{var s=window.location.href.toString();var p=/\/(%3F:title|name)\/([a-zA-Z0-9])+\//gi;if(p.test(s)){try{var n=s.match(p)[0].split("\/")[2];window.location.assign('http://letterboxd.com/imdb/'+n);}catch(e){}}};void(0);})();
I use
window.location.assign instead of window.open to open in the same window.