I'm trying to program a "simple" Chrome extension. The only thing it should do is add a bookmark (irrelevant to witch page). So, I read everything about the Google bookmark API.
But, I do not get it. All the code I found on this page (and other pages), doesn't work for me.
Also on this page, there is a sample project called "MyBookmark" linked.
So, I thought to try this out to understand how it works. But, also MyBookmark behave weird for me. It finds all my Bookmarks and lists them. But, if I try to Edit or Add a Bookmark (Red marked in the picture), and the URL and Name Textfields popup (green marked in the picture), and I try to do something with it, there isn't happening anything.
The only thing I can think of that the problem might be is: that if I have any wrong setting in Chrome?
Do you know what I am doing wrong?
edit:
Here is a very simple version of my code:
manifest.json:
{
"name": "My Bookmarks",
"version": "1.1",
"description": "decription.",
"permissions": [
"bookmarks", "activeTab"
],
"browser_action": {
"default_title": "My Bookmarks",
"default_icon": "icon.png",
"default_popup": "popup.html"
}, "manifest_version": 2 }
popup.html:
<html>
<head>
<script> src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script>
<script src="book.js"></script>
</head>
<body style="width: 400px">
</body>
</html>
book.js
window.onload = function()
{
chrome.bookmarks.create({'parentId': extensionsFolderId,
'title': 'Extensions doc',
'url': 'http://code.google.com/chrome/extensions'});
}