Inline JavaScript to hide bookmarks sidebar upon opening new browser instance

Does anybody know which options to use on the command-line start of Firefox such that the only thing displayed is the area within which an HTML page would be presented? … (read more)

Does anybody know which options to use on the command-line start of Firefox such that the only thing displayed is the area within which an HTML page would be presented?

I want to have it start with everything else turned off or hidden, namely

   memu bar
   page tabs bar
   address bar along all add-on buttons
   bookmarks sidebar

The "-kiosk" option is not appropriate for my needs.

-kiosk doesn't hide the sidebar (Bookmarks or not) if that sidebar was visible during last session before exit ... so ... no, "-kiosk" is not a proper implementation of a "page-only" display mode.

"-private-window" gives no benefit, display-wise, over and above what the "-new-window" option provides.

Everything I've read (even on the Mozilla support site) seems to point to creating a special profile for just that mode, and then to modify the "userChrome.css" file with custom properties to ensure the desired "off" setting for the GUI elements. That seems a rather "small-minded" view, ignoring the potential for huge market of self-contained hard-coded applications that would need only use the Firefox rendering engine, and nothing else!

One comment on Reddit indicated that the functionality was there ("-app" option working with XULrunner), but discontinued!


As a test, I did close all my browsers, leaving the bookmark sidebar visible before closing. I then entered:

firefox -kiosk -safe-mode -private-window ${URL}

I still get the bookmark-sidebar visible, with everything else "hidden" or "disabled", because visible sidebar is my default mode for normal browsing.

Is there no command-line startup switch to force that sidebar to "hide", equivalent to clicking on the "X" on the top-right corner?

OR ...

Is there any programmatic way to tell that to hide using JavaScript in the HTML page that is loaded? Everything I seem to locate refer to in-page Elements only, not Browser Elements. :frowning:

But "kiosk"(fullscreen-mode) is not the mode I want, because I want users to be able to have the simplified browser-based HTML App co-exist on the desktop with other windows, like a normal App.



    • Basic HTML test page** *(myHtmlGame.html)* **:**

``` <meta charset="UTF-8"> <title>myHtmlGame.html</title> <link href="myHtmlGame_bookmarks.css" rel="stylesheet" type="text/css"> <script src="myHtmlGame_bookmarks.js" type="text/javascript"> </script>

Box A
Box B
Box C
Box D
Box E
<script> {what to I place here } </script> ```



    • Basic Javascript file** (*myHtmlGame_bookmarks.js*) **:**

```

// REF: https://stackoverflow.com/questions/1690002/how-can-i-prevent-firefox-showing-my-extensions-sidebar-on-startup var current = this;

var quitObserver = {

  QueryInterface: function(aIID) {
     if (aIID.equals(Components.interfaces.nsIObserver) || aIID.equals(Components.interfaces.nsISupports)) {
        return this;
     }
     throw Components.results.NS_NOINTERFACE;
  },
  observe: function(aSubject,aTopic,aData ) {
     var mainWindow = current._windowMediator.getMostRecentWindow("navigator:browser");
     var sidebar  = mainWindow.document.getElementById("sidebar");
     if (sidebar.contentWindow.location.href == "chrome://daisy/content/sidebar.xul") {
        mainWindow.toggleSidebar('openDaisySidebar', false);
     }
  }

};

setTimeout(function() {

  var mainWindow = current._windowMediator.getMostRecentWindow("navigator:browser");
  var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
  observerService.addObserver(quitObserver,"quit-application-granted",false);

},2000); ```


I've tried using this alternative content for the JavaScript file, but that also failed (using '*hideSidebarBookmarks()*' call in the in-line script segment):

``` function hideSidebarBookmarks() { const sidebar = document.getElementById("CustomizableUI.AREA_BOOKMARKS") ; sidebar.hide() ; } ```

I even tried replacing the word "document" with "browser" in the above, still with no success. :-(



    • Startup command :**

``` firefox -new-window ./myHtmlGame.html & ```



    • Basic CSS file** *(myHtmlGame_bookmarks.css)* **:**

``` html { font-size: 14px ; font-family: "Liberation Sans", "Aileron", "Archivo", FreeSerif, serif ; line-height: 1.2em ; }

body { display: block ; background-color: #1F1F1F ; color: #FF0000 ;

margin-top: 0 ; margin-right: 0 ; margin-bottom: 0 ; margin-left: 0 ; }

/*

************************************************************************
*/

.game-grid { display: grid ; grid-template-columns: 300px 300px 60px ; grid-template-rows: 40px 300px 150px ; }

.game-item-1 { grid-column: 1 / span 3 ; grid-row: 1 / span 1 ; border: 1px solid #8FCF8F ; background-color: #1F1F1F ; }

.game-item-2 { grid-column: 3 / span 1 ; grid-row: 2 / span 2 ; border: 1px solid #8FCF8F ; background-color: #1F1F1F ; }

.game-item-3 { grid-column: 1 / span 2 ; grid-row: 2 / span 1 ; border: 1px solid #8FCF8F ; background-color: #1F1F1F ; }

.game-item-4 { grid-column: 1 / span 1 ; grid-row: 3 / span 1 ; /* box-sizing: border-box ; */ border: 1px solid #8FCF8F ; background-color: #1F1F1F ;

padding-left: 3 em ;

display: block ; color: #FFCF4F ;

word-wrap: break-word ; /* overflow-y: scroll ; overflow-y: auto ; */ overflow-anchor: none ; scrollbar-color: grey-black ; scrollbar-width: thin ; scroll-padding-bottom: 20px ;

/* In case you need to kick off effect immediately, this plus JS */ /* height: 100.001vh ; */ }


.game-item-5 { grid-column: 2 / span 1 ; grid-row: 3 / span 1 ; border: 1px solid #8FCF8F ; background-color: #1F1F1F ; }

div { padding-top: 1 em ; padding-right: 0 ; padding-bottom: 1 em ; padding-left: 0 ; }

```

The above will display per the attached image.

Asked by EricM Prieš 1 minutę

Firefox no longer allows me to bookmark web sites that I want for place in my bookmark folders.

Firefox no longer allows me to bookmark web sites that I want for place in my bookmark folders. I have encountered several situation when trying to bookmark a web site: … (read more)

Firefox no longer allows me to bookmark web sites that I want for place in my bookmark folders. I have encountered several situation when trying to bookmark a web site:

1- When I get to a site that I want to bookmark, I go to "Bookmarks", select and click on "Bookmark Current Tab" and nothing happens. On prior versions of Firefox, another panel would be presented where I would have the option to file the current tab to an existing Firefox folder or create an new folder.

Now I do not have that option available to me. These problems seems to to have started with the upgrade to 134.0.2

2- When I go to "Bookmarks" and select "Manage Bookmarks" I am able to see a listing of of the bookmarks but the list is not complete. I have preciously established and used the bookmark labeled as "Woodworking" which is no longer present, in fact the the last alphabetical listed bookmark is "Ryobi".

I did have and was able to use the bookmark "Woodworking" in the past. Why is everything beyond "Ryobi missing?

3 - Some times when I go to use bookmarks it does show provide me with the panel that would allow me to bookmark the current tab but it will not allow me to create a new folder where I want to place the current tab..

4 -I have tried to go to an older version of Firefox but have been unable to locate where I can obtain it. Would going back to an older version resolve my issues and if so where can I get an older version?

I have been using Firefox for many years and never had issues and have been very happy with it. Anything guidance you can provide to resolve these bookmark issues would be greatly appreciated.

Thanks in advance,

Victor

Asked by Vmcorral1@verizon.net Prieš 18 minučių

Can't open canva in the fedex website anymore?

Hi, I've been designing an invitation using canva on the fedex website. It looked good, but when I went back this week to the same site, I got an error: "Firefox Can’t … (read more)

Hi,

I've been designing an invitation using canva on the fedex website. It looked good, but when I went back this week to the same site, I got an error:

"Firefox Can’t Open This Page

To protect your security, www.canva.com will not allow Firefox to display the page if another site has embedded it. To see this page, you need to open it in a new window."

Of course, I can't open it in a new window. I don't seem to be able to use this site at all now. This error wasn't there before.

Is anyone else able to open canva via fedex's website? Is there something I can do to disable this security feature temporarily? https://www.office.fedex.com/default/canva is the link.

Asked by Lo Pierce Prieš 22 minutes

Microsoft-style forced upgrade and losing perfectly functioning plugins & addons

This mandatory upgrade completely illustrates the point of why so many never did. Upgrades tend to lose functionality- add-ons, etc, that we're accustomed to and still w… (read more)

This mandatory upgrade completely illustrates the point of why so many never did. Upgrades tend to lose functionality- add-ons, etc, that we're accustomed to and still work quite well with don't function anymore with browser upgrades, and there's no viable replacement available so we stick with what works and find other ways to compensate for any perceived vulnerabilities. Now, like Microsoft, you're forcing consumers to do things they never wanted to and taking away the reasons for using this browser to begin with. Given that we've been able to use older versions for years with no issues, there's no sugarcoating that this is all on you, Mozilla. Calling this course of action disappointing is a gross understatement and nothing more than keeping things polite.

Asked by jgrng2 Prieš 57 minutes

Can't log into Yahoo Mail from Firefox

Firefox on Windows 11 - can't log into Yahoo Mail. No problem with Microsoft Edge, Chrome or Duck Duck Go. I get the following message when trying from Firefox: "So… (read more)

Firefox on Windows 11 - can't log into Yahoo Mail. No problem with Microsoft Edge, Chrome or Duck Duck Go.

I get the following message when trying from Firefox: "Something's gone wrong. We may be having trouble with your connection. Connecting your device to Wi-Fi could help fix the issue or try again later. If you were using an app, close this page. Otherwise, start over."

All other websites work on Firefox. I've already told Firefox to "forget this website". still doesn't work.

Asked by rcaz6645 Prieš 1 valandą

Use sytem themes and cursor on Zen Browser

I have a different theme and cursor on my system. I would like to include them in Zen Browser. They are Candy Mac and Azenis respectively. There is no setting to do th… (read more)

I have a different theme and cursor on my system. I would like to include them in Zen Browser. They are Candy Mac and Azenis respectively. There is no setting to do this. Many other browsers have System themes as an option.

Asked by bobcollard Prieš 1 valandą

Bing Opening Tab When I Start Firefox

I have noticed that recently, whenever I start Firefox, BING is auto-opening a new tab *without my input.* Firefox is not my default browser (I use several), and I have r… (read more)

I have noticed that recently, whenever I start Firefox, BING is auto-opening a new tab *without my input.* Firefox is not my default browser (I use several), and I have removed ALL extensions and themes (except for ad-blocking, which has always been there), and ensured that pop-up blocker is enabled. My Windows 10 PC cannot find any malware; I hate being hijacked (esp. by Microsoft) and want this to stop! My other browsers do not do this...only Firefox. I have tried suggestions to modify REGEDIT, but can find no solutions to prevent this (other than not using Firefox anymore). Help, please! Thanks so much.

Asked by Jeffrey Link Prieš 1 valandą

Unreadable--blurry, then clear; blurry, then clear

Firefox has recently become unreadable--it is blurry, then clear, blurry, then clear. It has become unusable. I've moved on to Edge. After much research, it is apparent t… (read more)

Firefox has recently become unreadable--it is blurry, then clear, blurry, then clear. It has become unusable. I've moved on to Edge. After much research, it is apparent that this is a problem unique to Firefox, who hasn't bothered to address or correct this issue. No more Firefox for me:(

Asked by Ellen Prieš 1 valandą

multiple issues using PC

Hello! I have multiple issues with Firefox after YEARS and YEARS of usage. 1) There is always a problem logging into sites that require captcha. This started happening a… (read more)

Hello! I have multiple issues with Firefox after YEARS and YEARS of usage.

1) There is always a problem logging into sites that require captcha. This started happening a few months ago. So sites will not open in Firefox, but there's no problem with using Chrome.

2) All of a sudden, when I open and download PDFs from websites, the documents are black. I've gone in and disabled dark theme, but that hasn't made a difference. Again, this is a Firefox issue because it doesn't happen when I'm using Chrome.

Hoping you can help me with both issues. Thanks much!

Asked by marietal Prieš 2 valandas

my gmail does not open on latest Modzilla update 135.0

My gmail no longer opens on latest Modzilla update 135.0, although it still opens on Chrome or Edge. I can still access my Google account and other Google functions like … (read more)

My gmail no longer opens on latest Modzilla update 135.0, although it still opens on Chrome or Edge. I can still access my Google account and other Google functions like Google One but my gmail does not load. I do not want to switch to another browser so I tried to clear cache, cookies, history but it did not work either. I also tried to open my gmailin private browsing mode but it still did not open.

Asked by Neslin Ismailoglu Prieš 2 valandas