Pomoc pśepytaś

Glědajśo se wobšudy pomocy. Njenapominajomy was nigda, telefonowy numer zawołaś, SMS pósłaś abo wósobinske informacije pśeraźiś. Pšosym dajśo suspektnu aktiwitu z pomocu nastajenja „Znjewužywanje k wěsći daś“ k wěsći.

Learn More

Using an autoconfig file to create bookmarks

  • 3 wótegrona
  • 1 ma toś ten problem
  • 33 naglědow
  • Slědne wótegrono wót eddythorn

more options

I'm using an example provided by Mike Kaply to modify my autoconfig file to add bookmarks to users profiles. However, every time I launch FF, instead of the bookmarks being overwritten, I get an extra set. So, after 5 re-launches, I have 5 sets of the bookmarks I'm adding. Is there a way to prevent this? Here is the code I'm using: //Add bookmarks Components.utils.import("resource://gre/modules/Services.jsm"); var uri = Services.io.newURI("http://mike.kaply.com", null, null); var navBook = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService); //create new Folder var FolderId = navBook.createFolder(navBook.bookmarksMenuFolder, "New Folder", 0); //add bookmark to newly created folder navBook.insertBookmark(SCCCFolderId, uri, -1, "Mike's Blog");

I'm using an example provided by Mike Kaply to modify my autoconfig file to add bookmarks to users profiles. However, every time I launch FF, instead of the bookmarks being overwritten, I get an extra set. So, after 5 re-launches, I have 5 sets of the bookmarks I'm adding. Is there a way to prevent this? Here is the code I'm using: //Add bookmarks Components.utils.import("resource://gre/modules/Services.jsm"); var uri = Services.io.newURI("http://mike.kaply.com", null, null); var navBook = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService); //create new Folder var FolderId = navBook.createFolder(navBook.bookmarksMenuFolder, "New Folder", 0); //add bookmark to newly created folder navBook.insertBookmark(SCCCFolderId, uri, -1, "Mike's Blog");

Wót eddythorn změnjony

Wubrane rozwězanje

In the end, I had to write code using a for loop with an if/then statement to look for an existing bookmark. Obviously it's a little more complicated than this. It wasn't easy, but I'm able to do what I need to.

Toś to wótegrono w konteksće cytaś 👍 0

Wšykne wótegrona (3)

more options
more options

My understanding is that the distribution file is only implemented for new profiles - that it isn't read for existing users. Is this true?

more options

Wubrane rozwězanje

In the end, I had to write code using a for loop with an if/then statement to look for an existing bookmark. Obviously it's a little more complicated than this. It wasn't easy, but I'm able to do what I need to.

Wót eddythorn změnjony