Skip to content

Commit

Permalink
integrated querycrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jörg Schlötterer committed Oct 28, 2015
1 parent bdecbdb commit b99396b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
],
"dependencies": {
"bootstrap": "3.3.4",
"c4": ">=2.1.1",
"c4": ">=3.0.0",
"jquery": "~2.1.4",
"jquery-ui": "~1.11.4",
"peas": "https://github.com/EEXCESS/peas.git",
Expand Down
21 changes: 20 additions & 1 deletion js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,26 @@ require(['c4/searchBar/searchBar', 'c4/paragraphDetection', 'c4/namedEntityRecog
chrome.runtime.sendMessage({method: 'triggerQuery', data: queryProfile}, function(response) {
callback(response);
});
}});
},
queryCrumbs: {
active: true,
storage: {
getHistory: function(numItems, callback) {
chrome.storage.local.get('queryCrumbs_history', function(res){
var history = [];
if(res.queryCrumbs_history) {
history = res.queryCrumbs_history;
history.slice(Math.max(history.length - numItems, 0));
}
callback(history);
});
},
setHistory: function(history) {
chrome.storage.local.set({queryCrumbs_history:history});
}
}
}
});

// detect paragraphs
var p = paragraphDetection.getParagraphs();
Expand Down

0 comments on commit b99396b

Please sign in to comment.