Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly 136 - restart_item_in_menu.uc.js stopped working #128

Open
Acid-Crash opened this issue Jan 23, 2025 · 2 comments
Open

Nightly 136 - restart_item_in_menu.uc.js stopped working #128

Acid-Crash opened this issue Jan 23, 2025 · 2 comments

Comments

@Acid-Crash
Copy link

It was noticed that in Nightly 136 restart_item_in_menu stopped working.
Other scrips do work (for example, editbookmarkspopup_expanded AND search_engine_icon_in_searchbar)
Updating all files within method + script files itself + clearing startup cache did not solve the issue

What should have happened instead?
Menu element is present but clicking on it does nothing
Steps to reproduce the issue?
Enable script, open menu, look for the restart item

Screenshots (drag and drop images into this post):

Image

System information
OS & OS version: Win 10x64
Firefox or Thunderbird: Firefox Nightly
Firefox/Thunderbird version: 136.0a1 (2025-01-22) (64-bit)
Firefox/Thunderbird theme: default

@Speravir
Copy link

Speravir commented Jan 23, 2025

The reason is what I also wrote about in discussion. Inline event handlers must be converted into event listeners.

In regards to the script in question restart_item_in_menu.uc.js this means that in two places, lines 32 + 33 and lines 48 +49, have to be changed to something like this:

restartitem_filemenu.addEventListener("click", () => {if (event.button === 0) {RestartMenuFileAppItems.restartApp(false);} else if (event.button === 1) {RestartMenuFileAppItems.restartApp(true);} });
restartitem_filemenu.addEventListener("command", RestartMenuFileAppItems.restartApp(false) );

(Untested.)

@Acid-Crash
Copy link
Author

Tried to do the suggested line-swap
The result is quite unexpected: the browser cant to finish loading-in and then restarts itself, ending up in this infinite loop (load-restart) until I revert the change back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants