Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

Learn More

Bookmarks Bar Fails to Load Bookmarks on First Run of Firefox

  • 3 답장
  • 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