Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Претражи подршку

Избегните преваре подршке. Никада од вас нећемо тражити да зовете или шаљете поруке на број или да делите личне податке. Пријавите сумњиве радње преко „Пријавите злоупотребу” опције.

Learn More

Bookmarks Bar Fails to Load Bookmarks on First Run of Firefox

  • 3 одговорa
  • 1 има овај проблем
  • 10 прегледа
  • Последњи одговор послао cor-el

more options

We are using non-persistent desktops for a portion of our users and their primary web browser is Firefox, so I have attempted to customize their experience using the mozilla.cfg file which I have created. This mostly works however the very first time it opens the bookmarks I have added to the bookmarks bar fail to load. If they close firefox and re-open they come right up. Unfortunately every time they log into their virtual workstation they have top go through this process since the machine is non-persistent. The code I have used to add the bookmarks is as follows:

try {
var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
var uri = ios.newURI("https://localhost:61000", null, null);
var navBookmarksService = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService);
if (!navBookmarksService.isBookmarked(uri)) {
navBookmarksService.insertBookmark(navBookmarksService.toolbarFolder, uri, navBookmarksService.DEFAULT_INDEX, "Add X");
}
} catch(e) {displayError("firefox.cfg", e);}

Like I said, it works, I just need it to work the first time, not the second.

Any ideas?

We are using non-persistent desktops for a portion of our users and their primary web browser is Firefox, so I have attempted to customize their experience using the mozilla.cfg file which I have created. This mostly works however the very first time it opens the bookmarks I have added to the bookmarks bar fail to load. If they close firefox and re-open they come right up. Unfortunately every time they log into their virtual workstation they have top go through this process since the machine is non-persistent. The code I have used to add the bookmarks is as follows: <pre><nowiki> try { var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); var uri = ios.newURI("https://localhost:61000", null, null); var navBookmarksService = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService); if (!navBookmarksService.isBookmarked(uri)) { navBookmarksService.insertBookmark(navBookmarksService.toolbarFolder, uri, navBookmarksService.DEFAULT_INDEX, "Add X"); } } catch(e) {displayError("firefox.cfg", e);} </nowiki></pre> Like I said, it works, I just need it to work the first time, not the second. Any ideas?

Измењено од стране cor-el

Сви одговори (3)

more options

russjohnson said

We are using non-persistent desktops for a portion of our users and their primary web browser is Firefox, so I have attempted to customize their experience using the mozilla.cfg file which I have created. This mostly works however the very first time it opens the bookmarks I have added to the bookmarks bar fail to load. If they close firefox and re-open they come right up. Unfortunately every time they log into their virtual workstation they have top go through this process since the machine is non-persistent. The code I have used to add the bookmarks is as follows:
try {
var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
var uri = ios.newURI("https://localhost:61000", null, null);
var navBookmarksService = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService);
if (!navBookmarksService.isBookmarked(uri)) {
navBookmarksService.insertBookmark(navBookmarksService.toolbarFolder, uri, navBookmarksService.DEFAULT_INDEX, "Add X");
}
} catch(e) {displayError("firefox.cfg", e);}

Like I said, it works, I just need it to work the first time, not the second.

Any ideas?

If it works the second time it means, that this settings are apllied somwhere to application data/temp or something like that and it's loaded after this process. You must try to refresh/reget this data without restarting firefox.

more options

ESR mailing list or contact Mike

more options