Skip to content

Commit

Permalink
added new icon and helper item
Browse files Browse the repository at this point in the history
  • Loading branch information
vutran committed Sep 2, 2016
1 parent 9667456 commit 44d006c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Hacker News Icon by Freepik <http://www.flaticon.com/free-icon/hacker-news-logo_51785>

const got = require('got');

const getTopStories = () => got('https://hacker-news.firebaseio.com/v0/topstories.json', { json: true });
Expand All @@ -9,6 +11,15 @@ const getItemData = id => got(`https://hacker-news.firebaseio.com/v0/item/${id}.
module.exports = {
keyword: 'hn',
action: 'openurl',
helper: function(q) {
return {
title: `Get stories on Hacker News`,
subtitle: `Available Options: new, top, best`,
icon: {
path: './icon.png',
},
};
},
execute: q => new Promise(resolve => {
let prom = false;
switch (q) {
Expand Down

0 comments on commit 44d006c

Please sign in to comment.