joelpt / sidewise

Persistent sidebar extension for Chrome featuring tree style tabs and tab hibernation.
Creative Commons Zero v1.0 Universal
68 stars 13 forks source link

Strange behavior on latest Chromium (79.0.3945.79) #82

Open dlnsk opened 4 years ago

dlnsk commented 4 years ago

Tabs don't wake up in place but create duplicates. So when browser starts it copies all active tabs but not saves tree of dependents. Also the sidewise's window tab began to display inside sidewise.

Klausthorn commented 4 years ago

Me too:

Tabs don't wake up in place but create duplicates.

Chrome Version 79.0.3945.79 (Offizieller Build) (64-Bit)

Sidewise Version 2017.2.12.0

dtsiapas commented 4 years ago

Same here, waking hibernated tabs creates a new tabs. It would be really nice to see this project revive again!

mcpower commented 4 years ago

Here's the culprit (in the chrome.tabs documentation):

image

In js/bg/events/tab-events.js, function onTabCreated(a) is expecting the URL to be in a.url - not a.pendingUrl. To fix this, do a find and replace in the aforementioned file for

function onTabCreated(a){

and replace it with

function onTabCreated(a){if (a.url === "") { a.url = a.pendingUrl; };

to apply the patch. You will need to load in the modified extension as an unpacked extension in developer mode. Refer to this StackOverflow thread for details on how to modify a Chrome extension.

I would personally highly recommend patching Sidewise for yourself. If you don't want to, or encounter trouble while doing so, I have uploaded Sidewise 2017.2.12.0 with the above patch (as well as the patch to fix #83) pre-applied here: sidewise-mcpower-edited-82-83.zip. This is provided as-is, without warranty of any kind, and should be a last resort if you can't apply the above patch. You can load it as an unpacked extension - see the above StackOverflow thread for more details.


All patches in this comment are released into the public domain and is free from copyright. Original code is copyright (c) 2012 Joel Thornton sidewise@joelpt.net. If you distribute this patch, attribution is not required, although it would be appreciated 😄

dlnsk commented 4 years ago

@mcpower Thanks a lot! It works. Just add. Anybody can make changes in chrome extension's folder and just disable/enable sidewise extension.

mcpower commented 4 years ago

Just add. Anybody can make changes in chrome extension's folder and just disable/enable sidewise extension.

I didn't think this would work - if this is possible, malware installed on a computer could hijack a popular Chrome extension with important permissions (such as an adblocker) and do malicious things, like sending all browsing history to a third party.

I just tried this myself and I got this error message:

image

which matches my expectations. How did you manage to avoid the "corrupted" error?

dlnsk commented 4 years ago

It works for me. Maybe if I reload Chromium I'll get that error.

dlnsk commented 4 years ago

Small bug. Link that having target="_blank" attribute create tab which don't appear in sidewise.

mcpower commented 4 years ago

Link that having target="_blank" attribute create tab which don't appear in sidewise.

That seems like a Chrome bug - here's an example Tab which is given to the onTabCreated callback:

{
    "active": true,
    "audible": false,
    "autoDiscardable": true,
    "discarded": false,
    "height": 772,
    "highlighted": true,
    "id": 1476,
    "incognito": false,
    "index": 6,
    "mutedInfo": {
        "muted": false
    },
    "openerTabId": 1438,
    "pinned": false,
    "selected": true,
    "status": "complete",
    "title": "",
    "url": "",
    "width": 1149,
    "windowId": 1407
}

No URL is given. I suspect you can work around it by calling chrome.tabs.get and calling the onTabCreated callback again, but I'll need to investigate it further.

As there's a fair few bugs which needs to be fixed, I'll probably create a git repo soon which will collate these bug fixes together.

Klausthorn commented 4 years ago

Small bug. Link that having target="_blank" attribute create tab which don't appear in sidewise.

Is this still the same issue? If it is another bug, please open another issue!

Klausthorn commented 4 years ago

and replace it with

function onTabCreated(a){if (a.url === "") { a.url = a.pendingUrl; };

Thanks! worked for me.

mcpower commented 4 years ago

Link that having target="_blank" attribute create tab which don't appear in sidewise.

Turns out that isn't a Chrome 79 bug - it was a bug in my implementation!

I have created a fork of Sidewise with a lot of fixes and privacy improvements, including all fixes mentioned in this issue list. You can find the fork at https://github.com/mcpower/sidewise.

fissbomb commented 1 year ago

Is there a way to disable showing hibernated tabs altogether and just show live tabs?