Skip to content

Instantly share code, notes, and snippets.

@flobosg
flobosg / random-article.js
Created August 11, 2014 05:41
Instapaper Bookmarklet: Random article
javascript:var l="https://www.instapaper.com/u";if(location.href!==l){location=l}else{var a=$(".article_item .article_inner_item .title_row a.article_title");a[Math.floor(1+Math.random()*a.length)].click()}
@flobosg
flobosg / highlight-times.js
Last active August 29, 2015 14:05
Instapaper Bookmarklet: Highlight reading times
javascript:$('.meta_read_time').each(function(){var color;var time = $(this).text();time = time[1] === '·' ? parseInt(time.slice(2)) : parseInt(time);if (time >= 20){color = 'red';} else if (time >= 10){color = 'orange';} else {color = "limegreen";} $(this).css({'background-color': color, 'color': 'white', 'border': '2px solid '+color});});