Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

badge added to show total no of bookmarks #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions css/bootstrap.min.css

This file was deleted.

81 changes: 0 additions & 81 deletions css/custom.css

This file was deleted.

Binary file removed fonts/glyphicons-halflings-regular.eot
Binary file not shown.
228 changes: 0 additions & 228 deletions fonts/glyphicons-halflings-regular.svg

This file was deleted.

Binary file removed fonts/glyphicons-halflings-regular.ttf
Binary file not shown.
Binary file removed fonts/glyphicons-halflings-regular.woff
Binary file not shown.
8 changes: 5 additions & 3 deletions js/bookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ chrome.browserAction.onClicked.addListener(function() {
});
});

// processNode: Recursively traverse bookmarks tree to
// processNode: Recursively traverse bookmarks tree to
// create a flattened list
//
//
// requires: a bookmark treenode
// returns: flattened list of urls
function processNode(node) {
Expand All @@ -24,10 +24,12 @@ function processNode(node) {
node.children.forEach(function(childNode){
urls = urls.concat(processNode(childNode));
});
chrome.browserAction.setBadgeBackgroundColor({color:[190, 190, 190, 230]});
chrome.browserAction.setBadgeText({text:""+urls.length});
return urls;
}
// If we have a url, return it as a list to concatenate
if (node.url) {
return [node.url];
}
}
}
6 changes: 0 additions & 6 deletions js/bootstrap.min.js

This file was deleted.

Empty file removed js/hotkeys.js
Empty file.
6 changes: 0 additions & 6 deletions js/jquery-2.0.3.min.js

This file was deleted.

16 changes: 8 additions & 8 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"name": "Restumble",
"version": "1.0",
"description": "StumbleUpon for your own bookmarks",
"icons": {
"icons": {
"16": "img/icon16.png",
"48": "img/icon48.png",
"128": "img/icon128.png"
"128": "img/icon128.png"
},
"browser_action": {
"default_icon": {
"19": "img/icon48.png",
"38": "img/icon48.png"
}
"default_icon": {
"19": "img/icon48.png",
"38": "img/icon48.png"
}
},
"web_accessible_resources": [
"img/icon128.png"
Expand All @@ -21,6 +21,6 @@
"bookmarks"
],
"background": {
"scripts": ["js/jquery-2.0.3.min.js", "js/hotkeys.js", "js/bookmarks.js"]
"scripts": ["js/bookmarks.js"]
}
}
}