Skip to content

Instantly share code, notes, and snippets.

@EdGuiness
Last active January 3, 2016 01:09
Show Gist options
  • Select an option

  • Save EdGuiness/8387313 to your computer and use it in GitHub Desktop.

Select an option

Save EdGuiness/8387313 to your computer and use it in GitHub Desktop.
Source code for HN Leaders chrome extension
/*
A script to highlight leaders on HN
Uses zeptojs
*/
Zepto(function($) {
$('.subtext,.comhead').each(function() {
var link = $(this).children('a').first();
if (link === null) return;
var user = link.text();
if (user === null) return;
// Leaders list retrieved 2014-01-17 10:14 UTC from https://news.ycombinator.com/leaders
// (pg added)
if (/^(tptacek|patio11|jacquesm|edw519|ColinWright|llambda|fogus|shawndumas|tokenadult|jrockway|raganwald|ssclafani|jgrahamc|swombat|DanielRibeiro|danso|davidw|DanielBMarkham|grellas|rayiner|evo_9|ChuckMcM|jerf|cperciva|yummyfajitas|_delirium|mtgx|anigbrowl|icey|petercooper|robg|nostrademons|btilly|mechanical_fish|potatolicious|Anon84|Garbage|aaronbrethorst|InclinedPlane|rbanffy|sp332|ck2|wallflower|wglb|nreece|steveklabnik|jamesbritt|RiderOfGiraffes|Libertatea|philwelch|noonespecial|rdl|scott_s|rms|staunch|gojomo|gaius|sethbannon|michaelochurch|DanBC|jlgreco|sliverstorm|ukdm|tlrobinson|jonknee|acangiano|bane|mcantelon|blasdel|stcredzero|revorad|masklinn|mikeash|protomyth|wmf|mixmax|lionhearted|bensummers|wheels|mbrubeck|timf|Tichy|duck|johns|peter123|danilocampos|abraham|ph0rque|pyre|jacques_chester|taylorbuley|SwellJoe|RyanMcGreal|_pius|kenjackson|Alex3917|uptown|untog|joshuacc|jashkenas)$/.test(user)) {
link.css({'font-weight':'bold','font-size':'large'});
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment