insiderser / AutoFullscreen

Auto Fullscreen add-on for Firefox
https://addons.mozilla.org/en-US/firefox/addon/i-auto-fullscreen/
MIT License
12 stars 1 forks source link

Technical consultation #4

Closed DongYuLiu-Boss closed 1 year ago

DongYuLiu-Boss commented 1 year ago

Hello, the author. I want to trigger the same effect as you developed through the function button in the HTML page. The status bar of the browser automatically shrinks when the mouse moves up. At present, only full screen code can be written in the HTML page, but the status bar cannot be automatically shrinked or your plug-in can be invoked through JS in the HTML. What can I do?

insiderser commented 1 year ago

Hey @DongYuLiu-Boss. You can take a look at https://github.com/insiderser/AutoFullscreen/blob/master/startup.js to see how this plugin works.

This plugin gives users the same effect as if you pressed F11 key when Firefox was started. So you can theoretically ask users to tap on the F11 key to have the same effect. Just be aware of the following:

  1. F11 fullscreen mode affects the whole Firefox window, not only your tab. So if the user switches to a different tab / closes your tab, Firefox will still be in the fullscreen mode, and it might confuse the user.
  2. Firefox is the only browser I know that has a rich fullscreen mode. Chrome doesn't show this status bar when you move your mouse to the top of the screen. I don't know what other browsers do.

I hope I answered your question.

DongYuLiu-Boss commented 1 year ago

Thank you, my friend. I'm from China. Where are you from? I'm glad to communicate with you! I will try your method to guide me. Thanks again! The effect I want to achieve is code control in the HTML page. When the page is opened, the full screen of the browser is the same as that of Firefox when the F11 button is pressed. When the mouse moves over the browser, the status bar can automatically expand and shrink.

DongYuLiu-Boss commented 1 year ago

I have seen this JS code, but this program can only be installed in the form of Firefox plug-in. There is no browser object in the HTML page, so this program cannot run normally. How can I solve this problem?

insiderser commented 1 year ago

@DongYuLiu-Boss Sorry, I can't help you here. Maybe there are other ways to solve the problem you're trying to solve.

And I'm from Ukraine, BTW

DongYuLiu-Boss commented 1 year ago

Thank you, my friend