Skip to content

Instantly share code, notes, and snippets.

@aereal
Created February 24, 2016 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aereal/d045db2b6d2e07475e19 to your computer and use it in GitHub Desktop.
Save aereal/d045db2b6d2e07475e19 to your computer and use it in GitHub Desktop.
indexer = {
id: 'jquery',
name: 'jQuery',
color: '#0769AD',
index: function (ctx) {
return ctx.fetchDocument('http://api.jquery.com/').then(function (doc) {
var links = Array.from(
doc.querySelectorAll('.entry-title > a')
);
links.forEach(function (l) {
ctx.pushIndex(l.textContent, l.href);
});
});
},
CSS: function() {
var hideNavs = '#logo-events, body > header, #main, #sidebar, body > footer { display: none !important; }';
var resetLayout = '#content { float: none !important; width: 100% !important; }';
return [
hideNavs,
resetLayout
].join("\n");
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment