Showing questions tagged:

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? I… (மேலும் படிக்க)

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">

Box A
Box B
Box C
Box D
Box E
```



    • 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.

Archived 1 156

AVC video playback is periodically malfunctioning on Firefox 133.0.3 after updating Intel Graphics driver to 32.0.101.6129

My GPU is the integrated GPU on the Intel U7-155H CPU. When some AVC videos are played, the browser reacts extremely slow and the video image is glitched and at a really … (மேலும் படிக்க)

My GPU is the integrated GPU on the Intel U7-155H CPU. When some AVC videos are played, the browser reacts extremely slow and the video image is glitched and at a really low rate of frame, and the video decoding engine seemed to be 100% occupied as shown in the task manager (normal video playback never occupied so much of it). Seems like AV1 encoded video never triggered the problem. The problem doesn't always happen, but at a rather high frequency. This never happened before I updated the Intel graphics driver from 32.0.101.5972 to 32.0.101.6129. The problem seemed not to happen on other browsers such as Microsoft Edge.

Archived 1 271

google, and only google, has started appearing with a scroll bar in the middle and bottom of screen when in use

Hello, earlier in the day I pressed a keyboard shortcut on accident when picking up my keyboard and has changed google results quite dramatically. I grabbed my keyboard … (மேலும் படிக்க)

Hello, earlier in the day I pressed a keyboard shortcut on accident when picking up my keyboard and has changed google results quite dramatically. I grabbed my keyboard and had a menu pop up on the left side and after i closed it noticed my google results had a scroll bar now. The results page only presents itself on the left half of the screen and a scroll bar has appeared on both the right side, cutting off text, and bottom of the page. These scroll bars only move a tiny bit and are quite unnecessary, but makes scrolling a pain as I have to be sure I am outside the new scroll bar area as they take precedent from the main scroll bar. I have googled Firefox's keyboard shortcuts and haven't found the one i need to fix this. Before I'm asked, no I do not have crazy zoom on and no zooming in does not fix this problem.

Archived 2 249

"Please enter primary password" multiple times per day or per hour

For the last several weeks, Firefox has been prompting me to "Please enter primary password" multiple times per day or even per hour. If I do so, the dialog box goes away… (மேலும் படிக்க)

For the last several weeks, Firefox has been prompting me to "Please enter primary password" multiple times per day or even per hour. If I do so, the dialog box goes away, only to come back again later. I'm finding this very frustrating.

Firefox does always prompt for this when I start it, as it has for many years.

I tried the recommended solution for a similar problem presented here but it didn't help.

This started some time after I updated from 130.0.1 to 133.0, but I have no idea whether the update is the cause.

Can anyone recommend what I can do to solve this or at least to investigate it further?

Archived 10 212

Completely inaccessible window

My computer died about three days ago, and firefox had three windows open. When I rebooted the computer again, firefox automatically started up, and the flyout panel thin… (மேலும் படிக்க)

My computer died about three days ago, and firefox had three windows open. When I rebooted the computer again, firefox automatically started up, and the flyout panel thing that shows up when you right click on an app claimed that all three windows returned. However, only two of them were actually accessible, and clicking on the app to move between them and the F3 window confirmed this. Clicking on the third window accomplishes nothing, reveals nothing, and just moves the little checkmark around in that flyout panel. Closing the other two windows before restarting firefox does not open a new window because it thinks one is already there, but I cannot in any way see or access it outside of its label in the flyout panel. Even hitting "Show All Windows" just shows the window I am typing this in. What am I supposed to do here?

தீர்வுற்றது Archived 3 151

MISSING BOOKMARKS ICON

When my Firefox crashed today, I chose to restore it rather than troubleshoot. When it was done, my bookmarks icon had disappeared. Yet when I go to the individual websit… (மேலும் படிக்க)

When my Firefox crashed today, I chose to restore it rather than troubleshoot. When it was done, my bookmarks icon had disappeared. Yet when I go to the individual websites, I can see that each one is still bookmarked. How can I restore the icon that used to be in the toolbar at top? Thank you for any help you can give. I have been using Firefox for many years now and this is the first time I encountered this problem.

Archived 2 94

Firefox freezing up when trying to save images using save image as feature

When saving images from websites using the save image as feature, Firefox will freeze up and not register any mouse click or anything instead making a ding noise every ti… (மேலும் படிக்க)

When saving images from websites using the save image as feature, Firefox will freeze up and not register any mouse click or anything instead making a ding noise every time is register a mouse click. This will continue for like 30 seconds before it becomes normal then it will repeat this for every image. How can I solve this?

Archived 6 278

Mozilla Extended Support Browser

Like probably a Lot of you I don't support the unethical So-called "Forced-obsolescence" and am not planning to "upgrade" Microsoft every 18 months or so for the next 90 … (மேலும் படிக்க)

Like probably a Lot of you I don't support the unethical So-called "Forced-obsolescence" and am not planning to "upgrade" Microsoft every 18 months or so for the next 90 years on each on Every single family Computer and give in to their Scare tactics for financial, environmental and Ethical reasons.

I am currently running Firefox "Extended Support," or ESR, I think it's called. Was wondering, If I ever **DO** decide to upgrade our bloatware Spyware operating system(s), basically if they break enough Apps like Apple Likes to do to force an upgrade, how difficult or easy would it be to Migrate from ESR to the latest regular version of Mozilla/Firefox...with all my Settings, etc. still in place?

தீர்வுற்றது Archived 15 130

Can't watch Video after Asus bios and nvidia driver updated

I can't watch Twitch live stream and videos after updated.When I watching live stream on Twitch, the stream start showing some old tv effect but in colours green. I thoug… (மேலும் படிக்க)

I can't watch Twitch live stream and videos after updated.When I watching live stream on Twitch, the stream start showing some old tv effect but in colours green. I thought was Twitch problem, then I changed to watch video from my college by using their website. But it still has that effect. But I can watch Youtube videos with no problems. Then i changed to use Microsoft Edge to watch Twitch, surprisingly with no problem. I already updated to the latest version in Firefox. Can anyone help me Please. Thank You

தீர்வுற்றது Archived 4 337

fast internet speed but very slow download speed

So my internet speed is around 100 Mbps but i only get 10 to 12 Kbps when download a small file, idk why because i tried using ethernet and it is still 10 to 12 kbps (so… (மேலும் படிக்க)

So my internet speed is around 100 Mbps but i only get 10 to 12 Kbps when download a small file, idk why because i tried using ethernet and it is still 10 to 12 kbps (sorry for bad english)

தீர்வுற்றது Archived 2 981

Unable to update at download.mozilla.org due to insecure connection

This has been a problem for me for a very long time, and I'm tired of having to use Chrome every time there's an update to Firefox. The issue I have is that I will get th… (மேலும் படிக்க)

This has been a problem for me for a very long time, and I'm tired of having to use Chrome every time there's an update to Firefox.

The issue I have is that I will get the notification saying there's an update. I click the button to update now, the browser opens the auto download page and I get a not secure connection warning. The only work around I've found is to use Chrome, and sometimes I can use the "Other downloads" option.

I'm not running a VPN, or any other networking software on my pc. This is for the full program, not the Windows Store app.


Secure Connection Failed

An error occurred during a connection to download.mozilla.org. The server uses key pinning (HPKP) but no trusted certificate chain could be constructed that matches the pinset. Key pinning violations cannot be overridden.

Error code: MOZILLA_PKIX_ERROR_KEY_PINNING_FAILURE

   The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
   Please contact the website owners to inform them of this problem.
Archived 6 176

How to use Firefox address bar to search when using Startpage as the search engine

I prefer to use Startpage as my search engine with Firefox on my Mac. I have that set up, but it's so annoying that when I put something in the address or search bar, no… (மேலும் படிக்க)

I prefer to use Startpage as my search engine with Firefox on my Mac. I have that set up, but it's so annoying that when I put something in the address or search bar, no search happens. Instead, I just get the Startpage home page and then have to retype the same thing in there! How do I solve this?

Archived 1 170

Lost recently closed windows, history missing completely

Hello, Usually both of my previously closed windows reopen without issue, but the data for both of them disappeared this time when I clicked on a zoom link after closing… (மேலும் படிக்க)

Hello,

Usually both of my previously closed windows reopen without issue, but the data for both of them disappeared this time when I clicked on a zoom link after closing them. The link opened, but they didn't. I did the basic troubleshooting like checking my entire history (under "managed history") and looking in settings as well as following the instructions I found here at https://support.mozilla.org/en-US/questions/1407584, but everything's gone. It's like they never existed in the first place. Has anyone else had this issue?

Also, about a couple of months ago, Firefox started forgetting my accounts and logging me out of them once I closed the window/the tabs reloaded. Not sure if this is due to my computer's own storage (RAM) or an update-related issue - I haven't been able to figure it out yet.

Any insight on either or both of these is greatly appreciated!

Archived 2 98

What can i do to stop this horrible PIPicture on YTube on Linux now ?

i have Linux Cinnamon 22 and want to stop the PIP on YT. I disabled/unchecked box for PIP on FFox and PIP still happen on YT. What can i do to stop this horrible PIP now … (மேலும் படிக்க)

i have Linux Cinnamon 22 and want to stop the PIP on YT. I disabled/unchecked box for PIP on FFox and PIP still happen on YT. What can i do to stop this horrible PIP now ? thank you.

Archived 4 92