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

(Feature Request) Firefox version of Marvellous Suspender #18

Open
dnet890 opened this issue Feb 5, 2021 · 14 comments · May be fixed by #225
Open

(Feature Request) Firefox version of Marvellous Suspender #18

dnet890 opened this issue Feb 5, 2021 · 14 comments · May be fixed by #225
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@dnet890
Copy link

dnet890 commented Feb 5, 2021

Hi
I found this extension is good and is there any possibility to release this extension in Firefox?

@RJVB
Copy link

RJVB commented Feb 6, 2021

As related in the issue above, I have been using an older version (6.30) of TGS in Firefox Quantum, which is completely functional except in private windows. I created that XPI extension directly from the Chrome Store version using the "Chrome Store Foxified" FF extension (NB: you need an older FF copy for that extension to work correctly; I keep a FF v59 around for that). That old version works OK, even "unsuspend all tabs" works (in the current window).

Yesterday I built another "de-malicioused" fork of TGS, v7.1.10 to a .crx module and ran that through Chrome Store Foxified. I had to set incognito to "spanning" in src/manifest.json because FF doesn't support "split" but with that the extension converted and runs almost fine. Annoyingly the almost means that unsuspending doesn't work at all in this case. I'm still looking into that.

@devansh08
Copy link

Thanks for the incognito tip @RJVB !! I was able to debug further and found a fix to make unsuspending work.

Fix is to remove the key-value pair autoDiscardable: false from the unsuspendTab function in background.js. Its at line 631 in the original repo and 624 in this one. Apparently the update function here in Firefox doesnt take autoDiscardable as a valid key. This is enough to make unsuspending work but I cant say if it breaks something else. So far everything looks fine for me.

Although unsuspending in incognito mode still doesnt work. There is an issue with calling chrome.extension.getBackgroundPage() (in popup.js, line 5) in Firefox when using incognito mode. When in incognito the function returns a null which causes an error and the script stops. The issue is detailed more here. From what I have read here it seems like there is a fix for this but would require a lot of changes/testing. I will try and see if there is a simple change for this but not keeping my hopes up there.

Regardless, it works well enough now for my needs :) Do note, this is tested with the v7.1.6 (last non malicious release) of original TGS and on Firefox Developer Edition v91.0b8. Had to use Developer edition since normal FF doesnt allow installing unsigned addons; and with the how Chrome Store Foxified is going on I dont think it would be possible to easily get signed xpis.

@RJVB
Copy link

RJVB commented Aug 1, 2021

Thanks. I must admit that I had moved on to other things because my old foxified TGS version does what I want.

I also moved to using Waterfox since chiefly because it's noticeably snappier (and maybe lacks some phoning-home that FF does, can't remember). I saw better support for Chrome extensions being mentioned in the latest release notes. When I open https://go.gioxx.org/tgs in Waterfox I indeed get an "Add to Waterfox" button, which then gives a failure message about unsupported features. I could install https://chrome.google.com/webstore/detail/custom-chrome-extension-m/balnpimdnhfiodmodckhkgneejophhhm so it looks like you should be able to get a version into the FF extensions "store" without too much trouble. Or, maybe you can list the required features conditionally so the feature check doesn't fail?

@Coniferish
Copy link

There is another extension that works in a similar way and has some popularity if you haven't already found a solution @dtantono:
https://addons.mozilla.org/en-US/firefox/addon/auto-tab-discard/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search

@gioxx gioxx self-assigned this Aug 17, 2022
@SleepDaemon
Copy link

Any updates

@gioxx
Copy link
Owner

gioxx commented Oct 11, 2022

Not at the moment.

@SleepDaemon
Copy link

Not at the moment.

I went to https://www.extensiontest.com/, and gave only 1 compatibility problem and it was this:
image

I've linked the full report here: report.txt

@RJVB
Copy link

RJVB commented Oct 11, 2022 via email

@SleepDaemon
Copy link

Could this be published as a userscript (for use with GreaseMonkey or TamperMonkey)?

not really, considering how complicated it is.

@goelvatsal
Copy link

goelvatsal commented Aug 15, 2023

As related in the issue above, I have been using an older version (6.30) of TGS in Firefox Quantum, which is completely functional except in private windows. I created that XPI extension directly from the Chrome Store version using the "Chrome Store Foxified" FF extension (NB: you need an older FF copy for that extension to work correctly; I keep a FF v59 around for that). That old version works OK, even "unsuspend all tabs" works (in the current window).

Yesterday I built another "de-malicioused" fork of TGS, v7.1.10 to a .crx module and ran that through Chrome Store Foxified. I had to set incognito to "spanning" in src/manifest.json because FF doesn't support "split" but with that the extension converted and runs almost fine. Annoyingly the almost means that unsuspending doesn't work at all in this case. I'm still looking into that.

Hello, this is a VERY late reply, but after I recently switched to Firefox, I found that a major dealbreaker was that I didn't have The Great Suspender enabled. This might be a far stretch, but do you still have the source code for your fork of TGS?
@RJVB

@RJVB
Copy link

RJVB commented Aug 15, 2023

I never got the "demalicioused" version to work (I must have given up shortly after the message you cited) but here's the xpi for v6.30 which still works. I've never used the "suspend all other tabs" or "unsuspend all" as far as I can remember but "doesn't suspend for now" works even if you don't get a confirmation about it.
Occasionally a suspended tab won't unsuspend the normal way (usually only after a browser restart) but the nice thing with this extension is that the URL isn't encoded so you can just remove the moz-extension:// bit in front of it and reload the the page that way.

TheGreatSuspender-6.30.zip

@goelvatsal
Copy link

Thank you so much! Also, did you manage to get the suspend shortcut to work (Control - Shift - S)?

@RJVB
Copy link

RJVB commented Aug 15, 2023 via email

@dvalter
Copy link

dvalter commented Dec 3, 2023

I have been working on Firefox fork of TGS since 2019 and made it to a somewhat working state but did not bother do re-brand and refactor it to get most out of FF features.

My repository is here.

It nice to see that work has benn picked up under a new name. I have rebased most of my commits on your master branch and tested if it works.

Hope this would help with your work on FF support. If you need, I can provide all the help I can in my spare time.

@dvalter dvalter linked a pull request Dec 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants