Bookmarks permission for Google Chrome -
i looking build google chrome extension fetches bookmarks the browser , sent them server synchronization perspective,but seem complain me of "permission error
" "api method
" used in "background.html
", though have set necessary permission in "manifest.json
"
here my manifest.json
like
{ "name" : "sync bookmark", "background_page": "background.html", "version" : "1.0", "content_script" : { "css" : ["bookmark.css"], "js" : ["js/jquery.js","js/bookmark.js"] }, "browser_action" : { "default_icon" : "images/bookmark.png", "default_title" : "syn bookmark", "default_popup" : "bookmark.html" }, "permission" : [ "bookmarks", "management", "unlimitedstorage" ] }
and here background.html code
chrome.bookmarks.gettree(function(bookmarks) { printbookmarks(bookmarks); }); function printbookmarks(bookmarks) { bookmarks.foreach(function(bookmark) { console.debug(bookmark.id + ' - ' + bookmark.title + ' - ' + bookmark.url); if (bookmark.children) printbookmark(bookmark.children); }); }
// above code used following link
now if try debug above code in chrome developer console return error of permission of api methods used.
got miss 's' in permission i.e "permission" instead of "permissions"
Comments
Post a Comment