JSFiddle - React, Tailwind, and code Playground

HTML

<a href="javascript:(function(){jQuery('.ruleofthird').remove();jQuery('img').each(function(idx,v){h=jQuery(v).height();w=jQuery(v).width();if(h>30){str='<div class=\'ruleofthird\' style=\'position:absolute;left:0;top:0\'><div style=\'position: absolute;left:0px; top:0px;border-top: 1px solid #000;border-bottom: 1px solid #000; margin-top: '+Math.floor(h/3) + 'px;';str += 'width:' + w + 'px; height: ' + Math.floor(h/3) + 'px;\'></div>';str += '<div style=\'position: absolute;left:0px; top:0px;border-left: 1px solid #000;border-right: 1px solid #000; margin-left: ' + Math.floor(w/3) + 'px;';str += 'width:' + Math.floor(w/3) + 'px;height: ' + h + 'px;\'></div></div>';jQuery(v).parent().append(str);}});})()">Rule of Thirds</a>
<br>
<br>
Drag the link above to your bookmark bar, go to Pinterest and click on the saved bookmark... enjoy!
<br><br>
Ref: http://en.wikipedia.org/wiki/Rule_of_thirds

<br />
<br />

This gist was forked by Alex Dergachev from <a href="http://jsfiddle.net/gbU3H/">http://jsfiddle.net/gbU3H/</a> to show the source code clearly.
<br />
Source: <a href="http://www.imemine.it/2012/07/05/rule-of-thirds-bookmarklet-for-pinterest/">http://www.imemine.it/2012/07/05/rule-of-thirds-bookmarklet-for-pinterest/</a>

<br />
<br />

Source code:
<textarea cols=100 rows=40> 
function () {

    jQuery('.ruleofthird').remove();

    jQuery('img').each(function (idx, v) {
        h = jQuery(v).height();
        w = jQuery(v).width();
        if (h > 30) {
            str = '<div class=\'ruleofthird\' style=\'position:absolute;left:0;top:0\'>
              <div style=\'position: absolute;left:0px; top:0px;border-top: 1px solid #000;border-bottom: 1px solid #000; margin-top: ' 
                + Math.floor(h / 3) + 'px;';
          
            str += 'width:' + w + 'px; height: ' + Math.floor(h / 3) + 'px;\'></div>';
          
            str += '<div style=\'position: absolute;left:0px; top:0px;border-left: 1px solid #000;border-right: 1px solid #000;...