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

[BUG]Again, the script stopped working due to new changes in Nightly 136a. (Old issue: The keyboard shortcut functionality and the context menu option of the Private Tabs script stopped working in Firefox Nightly). #109

Open
kaos-55 opened this issue Jan 12, 2025 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@kaos-55
Copy link
Contributor

kaos-55 commented Jan 12, 2025

Link to the file containing the bug
https://github.com/aminomancer/uc.css.js/blob/master/JS/privateTabs.uc.js

Describe the bug
Some of the functionality of the Private Tabs script stopped working in Nightly 136a, specifically the shortcut Ctrl+Alt+P and the option to open a link in a new private tab in the context menu when right-clicking a link does not work either, clicking the option does nothing.

To Reproduce
Steps to reproduce the behavior:

  1. Install Firefox Nightly 136a
  2. Install privateTabs.uc.js script
  3. Press the key combination Crtl+Alt+P
  4. Right-click a link and select the option to open the link in a new private tab.

Expected behavior
Pressing Ctrl+Alt+P opens a new private tab.
Clicking the Open link in new private tab option opens a new private tab.

Desktop (please complete the following information):

  • OS: Windows 10
  • Firefox update channel: Nightly 136
  • Version: 136a1
  • Build ID: 20250112

Additional context
The script is fully functional up to Firefox version 135 beta, from nightly 136 on some features of the script start to fail, the new private tab button in the tab bar remains functional.

@kaos-55 kaos-55 added the bug Something isn't working label Jan 12, 2025
@aminomancer
Copy link
Owner

What fx-autoconfig version?

@kaos-55
Copy link
Contributor Author

kaos-55 commented Jan 13, 2025

fx-autoconfig version 0.10.4 I understand that this is the latest version

@kaos-55
Copy link
Contributor Author

kaos-55 commented Jan 14, 2025

I just found something, I do not know if it can be useful, apparently it is related to these changes:
Bug 1937080 - Block inline event handlers in Nightly https://hg.mozilla.org/integration/autoland/rev/b835e8ac47e3
Disabling this option (security.browser_xhtml_csp.enabled) makes the script functional again.

@aminomancer
Copy link
Owner

That's a useful clue, thanks. Try updating to 1.4.0 in 3f426af

@kaos-55
Copy link
Contributor Author

kaos-55 commented Jan 14, 2025

I tried version 1.4.0 and it doesn't seem to work, now even the new private tab button doesn't appear. I went back to the previous version to see if it wasn't a problem with the installation, and version 1.3.3 works 🤷‍♂️

@aminomancer
Copy link
Owner

Can you show me the browser console logs for 1.4.0? And you're still using fx-autoconfig 0.10.4?

@kaos-55
Copy link
Contributor Author

kaos-55 commented Jan 15, 2025

Sure here it is:
browser-console-firefox
fx-autoconfig is in version 0.10.4

@aminomancer
Copy link
Owner

Gotcha, I made a mistake with the hotkey registration. Give 1.4.1 a try, in 361b324.

@kaos-55
Copy link
Contributor Author

kaos-55 commented Jan 17, 2025

Yes, the new version works in nightly, again thanks for fixing it I close the issue.

@kaos-55 kaos-55 closed this as completed Jan 17, 2025
@kaos-55
Copy link
Contributor Author

kaos-55 commented Jan 25, 2025

Again, I reopen the issue. The script stopped working again due to these new changes that were implemented nightly on 01/23/2015:
https://bugzilla.mozilla.org/show_bug.cgi?id=1881888
Now the problem is due to the removal of several functions, one of which is used by the script.
Image
I don't know if it would be best to wait for the next nightly release (137) so they can finish removing everything they planned for 136 and avoid breaking scripts after a short time.

@kaos-55 kaos-55 reopened this Jan 25, 2025
@kaos-55 kaos-55 changed the title [BUG]New issue: The keyboard shortcut functionality and the context menu option of the Private Tabs script stopped working in Firefox Nightly. [BUG]Again, the script stopped working due to new changes in Nightly 136a. New issue: The keyboard shortcut functionality and the context menu option of the Private Tabs script stopped working in Firefox Nightly. Jan 25, 2025
@kaos-55 kaos-55 changed the title [BUG]Again, the script stopped working due to new changes in Nightly 136a. New issue: The keyboard shortcut functionality and the context menu option of the Private Tabs script stopped working in Firefox Nightly. [BUG]Again, the script stopped working due to new changes in Nightly 136a. (Old issue: The keyboard shortcut functionality and the context menu option of the Private Tabs script stopped working in Firefox Nightly). Jan 25, 2025
@aminomancer
Copy link
Owner

aminomancer commented Jan 29, 2025

Ah, that's a big problem. They removed JSM support, including Cu.import, which exposed all the variables. People have been using it as a hack for a long time to get access to variables that are not exported by the module. In this case, TAB_CUSTOM_VALUES and SessionStoreInternal, which gives us access to restoreTab, a method that is needed to convert a tab back and forth between the private contextual identity and no identity.

Without that, we would need to use the public duplicateTab function like the original script. I avoided that when I made the script because it doesn't let us pass the skipAnimation parameter, which caused an unsightly animation on the tab (or at least it did; those animations may no longer exist now).

I will experiment with it when I have time, but you may need to remind me. If you want, you can try replacing togglePrivate with xiaoxiaoflood's togglePrivate (except the last line, the extra arguments to gBrowser.removeTab are worth keeping) and see if you're happy with the results. I guess even if it does have some visual jank, it's better than losing the script entirely. And maybe there is a way to stop the animations with CSS. Those are things I can look into.

As for the release cycle, it makes no difference really. There is a constant influx of changes. This just happens to be a big one, but there will be others in 137.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants