0

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.

here is apictur of it

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'});
}
man zet
  • 826
  • 9
  • 26
  • Please [edit] the question to be on-topic: include a **complete** [mcve] that duplicates the problem. Usually, including a *manifest.json*, some of the background *and* content scripts. Questions seeking debugging help ("**why isn't this code working?**") must include: ►the desired behavior, ►a specific problem or error *and* ►the shortest code necessary to reproduce it **in the question itself**. Questions without a clear problem statement are not useful to other readers. See: "**How to create a [mcve]**", [What topics can I ask about here?](http://stackoverflow.com/help/on-topic), and [ask]. – Makyen Oct 24 '16 at 19:04
  • If you are using a specific, publicly available example, at a minimum, provide a link to the example so we know exactly what you are talking about and don't have to guess or search. However, enough code for a [mcve] should go in the question. – Makyen Oct 24 '16 at 19:06
  • im sry i thought, it would be very simple to find the examle and sadly stackoverflow dont let me post more then one link in my question. Here is the direct Download link of the samle im talking about: https://developer.chrome.com/extensions/examples/api/bookmarks/basic.zip – man zet Oct 24 '16 at 19:43
  • i also tryied to make a very simple version of my code, and added it to my question. Hope QUestion is now more understandable. – man zet Oct 24 '16 at 19:44
  • The code you've added doesn't contain the parts that deal with Add/Edit/Delete buttons so naturally there's no way to answer your question. – wOxxOm Oct 25 '16 at 02:52

0 Answers0