Follower Tabs
-
@pafflick Sheer genius; thanks for this gem
Two questions:
- I assume each future V update will vaporise this file [hence i'll need to keep replacing it]?
- I used your code in your post to which i'm directly replying here, but i see you've been also updating your earlier post https://forum.vivaldi.net/post/243020. However they subtly disagree with each other [ignore my paths here; the actual working file is correctly in
/opt/vivaldi-snapshot/resources/vivaldi/user_files
]:
-
I'll answer you, once a new SS arrives.The new SS arrived and it indeed vaporized my file...- The difference is irrelevant - I renamed the function in my first post just because of my paranoid aesthetics (there's one "follower" tab), but it doesn't really matter which one you'll use.
-
Nice work! Well done Pafflick!
Time to submit it to the dev team for implementation -
I moved some posts from the Feature Request forum so that we don't hijack that thread any more.
-
@ornorm said in Follower Tabs:
Time to submit it to the dev team for implementation
Yeah, I was thinking about it. I mean, if they didn't hesitate to put some crazy stuff (like the Skewed Images) there, then why wouldn't they put something actually useful, like the follower tabs?
The only thing holding me back (for now) is that as a perfectionist (or just paranoid) I'd like to test this code a little bit more and make some improvements - see if I can find any solutions to some obstacles that I have already found - and to the ones that others will probably find very soon...
-
@pafflick For sure. I really know perfectionism so I truly understand. In any case, it is a present that you give to the community so you can take all the time you want!
-
@pafflick said in Follower Tabs:
I renamed the function in my first post just because of my paranoid aesthetics (there's one "follower" tab)
Additional to my earlier kudos i wanna heap more praise on you for this brilliant thing you've gifted us... AND i like it that you "tidied up" by creating this dedicated topic to keep it all "nice".
Wrt the quoted text, teehee i'm now entering into a "competition of the pedants" with you! Whilst as you rightly say "there's one "follower" tab" & "Each tab can have only one follower tab", it's also true that "You can use multiple pairs of origin-follower tabs in one session" [which i proved to myself this morning before coming back to the forum & finding you've rearranged posts & created this dedicated topic with some extra content]. Thus, pedantically, your code containing "FollowerTabs" rather than "FollowerTab" is actually semantically accurate.
Wrt your
Method 1 - Bookmarklet
This was what i actually tried [my] yesterday morning, before you'd developed the Page Actions alternative. It worked, but i decided to not persist with it for a logistic tangential reason... my Bookmark Bar is configured for "Bookmark icon only", & dragging this new bookmark to the bar results in a completely invisible BM because it has no icon. When i know it's there & point to it, it then highlights & shows tooltip, but otherwise it cannot be seen. Is there a nice way i can force it to use some icon please? [i fear this is likely a dumb question & i've forgotten some basic technique].
This is such great work you've done, @pafflick... bringing Follower TabS [heehee] into V, from our venerable grand old dame OperaPresto, transforms the way i can now browse, wrt my erstwhile decision to open multiple tabs from any single tab for subsequent reading. Lovely!
.
.
EDIT - After performing the V-SS update to 2.1.1332.4:Method 2 - Page Actions
Persistent on page refresh, not persistent through browser updatesI'll answer you, once a new SS arrives.The new SS arrived and it indeed vaporized my file...NO, not so, here. To my pleasant amazement, after i had completed the V-SS update this morning, in my file manager i saw that
/opt/vivaldi-snapshot/resources/vivaldi/user_files
continued to contain my*Follower-Tabs.js*
file! After then opening V-SS again, visually confirming it truly is the new version, then inspecting its Page Actions pop-up menu, i noted indeed thatFollower-Tabs
is still a listed option. Then i tested it again, which confirmed it remains fully functional. This explicitly implies that, for me at least, your Coding Cleverness is now a "permanent" part of my V-SS, persisting across browser updates. Possible explanations [more than one is possible simultaneously]:- You were blind drunk &/or stoned out of your mind when you earlier tested it in your V-SS.
- My stubborn inclusion of the "s" has bestowed magical anti-vaporise powers on the file.
- Linux rulz, once again!
-
@steffie said in Follower Tabs:
it's also true that "You can use multiple pairs of origin-follower tabs in one session" (...) Thus, pedantically, your code containing "FollowerTabs" rather than "FollowerTab" is actually semantically accurate.
Yeah, depends on how you look at it. Still, when you call the page actions, by pressing the "Follower Tab" checkbox you create just a single follower tab (even if you have some opened already). So, each time the script is executed, it results in creating just one tab. Ofc, for the script itself, it doesn't matter if you name it "Steven" or whatever you think is more appropriate in your opinion (except for the reserved words).
@steffie said in Follower Tabs:
Is there a nice way i can force it to use some icon please?
You know - that is actually a good question. I use my bookmarks bar only when I need it (which is almost never) and I configured it so that it contains only some bookmarklets (various JavaScript actions) and links to internal pages. I depend solely on the bookmarklet's names and I didn't even think about a good alternative for people who use only icons.
Unfortunately, there doesn't seem to be a way to do that in Vivaldi (apart from modifying the browser or the
Bookmarks
file). I found this solution for Google Chrome, but since Vivaldi doesn't import bookmarks icons (even though it exports them), it just didn't work.@steffie said in Follower Tabs:
open multiple tabs from any single tab
I don't think it works like that... Or did I miss something in your explanation?
@steffie said in Follower Tabs:
in my file manager i saw that
/opt/vivaldi-snapshot/resources/vivaldi/user_files
continued to contain my*Follower-Tabs.js*
file!Is that the actual path of your Vivaldi installation? Mine contains Vivaldi's version number, so obviously it changes on each update...
@steffie said in Follower Tabs:
- You were blind drunk &/or stoned out of your mind when you earlier tested it in your V-SS.
- My stubborn inclusion of the "s" has bestowed magical anti-vaporise powers on the file.
- Linux rulz, once again!
... and I'm pretty sure it vanished; I had the file opened in a text editor and once the update was installed, I couldn't save the file anymore (because it was deleted). I've checked the new path and the file was not there either.
So, it's not the 1st one (I get drunk/stoned just as often as I hang out with Rob Swire*), not the 2nd one (because the
s
is irrelevant) and most definitely not the 3rd one (which is obviously an invalid statement).Well then, I'm really sorry to break it to you, but the only option left is the inevitable truth, that it's just a Linux bug. Yep. Definitely a Linux bug. Like totally. Linux bug confirmed.
* I've never met him
-
Some test data for you.
If you tell me that Windoze unhelpfully vaporises that file every time V updates, i believe you. I have no idea how Macs respond in that scenario. However i can now confidently assure you that based on my testing today & t'other day, Linux behaves in a much more sophisticated & user-supportive way... Linux Vivaldi updates do NOT vaporise that file.
Or did I miss something in your explanation?
Yes you did. I was alluding to my historical mode of browsing, eg, Guardian... i review the home page, & middle-click on every article of interest as i work my way down the page, then later i change to each of those many tabs so-opened, & read each article then close its tab, one by one.
Is that the actual path of your Vivaldi installation?
Yep, but not just mine, that's how it will be for any Linux Vivaldi installation [at least, if they follow the same installation pattern as all my distros do].
Mine contains Vivaldi's version number
Must be a Windoze thing... it is not universal across all platforms, as i have shown you.
most definitely not the 3rd one
Haha, dream on!
-
@gwen-dragon I deleted the first attempt [copied & pasted from my spreadsheet into forum codeblock] coz all its columnar formatting was lost so it was hard to understand. Now it's just a picture, but at least it can be easily understood.
-
@steffie said in Follower Tabs:
I have no idea how Macs respond in that scenario.
Surprisingly, these kind of mods (as page actions) survive an update, j'en suis Γ©bahi (= I'm astounded). I'm using another one, it's still here, though I updated V after installing it.
-
@steffie said in Follower Tabs:
I was alluding to my historical mode of browsing
Right, it makes sense to me now - for some reason, I missed that part when I was reading it for the 1st time. My bad.
@steffie said in Follower Tabs:
Linux Vivaldi updates do NOT vaporise that file
(...)
Yep, but not just mine, that's how it will be for any Linux Vivaldi installation [at least, if they follow the same installation pattern as all my distros do].So, that's the reason why those files are not erased on each update. The path in which they reside doesn't change. And it appears to be like that on MacOS too. However, the reason for which the Vivaldi developers decided to use the version number as the main catalogue for the browser on Windows (and thus erasing and recreating the whole thing on each update) is beyond me...
-
@pafflick said in Follower Tabs:
The path in which they reside doesn't change
Correct [& yes, the Windoze way of doing the V updates seems comparatively weird; in fact (OT) the whole Windoze V installation paradigm is weird to me as a Nixer, wrt fact that i can simply do a standard install of Stable and SS, which create separate but parallel paths for the pgm files [within
/opt/
, & separate but parallel paths for the user-config files [within~/home/username/.config/
]. No need for that strange Windoze method]. But back to the topic, though the path doesn't change during the updates, the individual files within the subdirectories certainly do [duh]... in all that testing i did, i watched the file manager in real time as the updates proceeded, & observed all the other [ie, non-Follower-Tabs.js
] files suddenly vanish for a moment, then miraculously get "reborn". I was/am really pleased to observe the persistence of "my" file, but surprised, coz it implies that the Linux V installer [aka, the distro package manager] does not simply nuke the entire previous directory structure then insert the new structure; it's more forensically surgical than that. -
@pafflick the more I read it, the more I like it! Will try as soon as I hit my personal pc (weekend, for now work pc only)
-
@steffie I've just downloaded the latest patch to Stable and I can confirm that the file is being wiped out here on the browser update. The updater creates a new directory (with the current version number as the folder's name) and removes the old directory completely afterwards (w/o checking if there are any extra files).
@steffie said in Follower Tabs:
it's more forensically surgical than that
In other words, it just overwrites the old files...
-
@pafflick said in Follower Tabs:
In other words, it just overwrites the old files...
Yes, sure... aka... Linux rulz.
-
I've just downloaded the latest patch to Stable and I can confirm that the file is being wiped out here on the browser update
Well, in contrast to your unfortunate Windoze behaviour for Stable [following SS], just now i also updated my Stable, & of course its
Follower-Tabs.js
file still stayed safe within/opt/vivaldi/resources/vivaldi/user_files/
.For the benefit of future thread readers who might like to use your excellent code, might it be helpful to edit your older [instructional] post to clarify that using the Page Actions method actually is persistent across updates for Mac & Linux, but not for Win [just so they don't have to read the entire thread to learn this fact]?
-
This is really good for pages playing media. If I put it on by default, I won't unload the video/audio track by accidentally navigating to a different page if I click something.
-
Just some ideas:
- For pages that load AJAX-ish content maybe a mutation observer triggering a rescan after some time could help.
- If a link has a target already: Don't add a new one.
- A short check if it is a plain old link (Good, apply _thetarget) or a Javascript (do nothing) would be helpful too.
- Generating a UUID or something similar as target name (once) could help avoiding clashes with existing targets and allow follower tabs for multiple tabs.
-
@quhno said in Follower Tabs:
- For pages that load AJAX-ish content maybe a mutation observer triggering a rescan after some time could help.
Yeah, I thought about it. I just didn't have enough time to improve the script.
@quhno said in Follower Tabs:
- If a link has a target already: Don't add a new one.
It depends on your workflow. When I use the Follower tab, I want all of the targets to be overwritten. Maybe if there are frames on the page... It's still rare though. Usually,
target
is set to_blank
or there is no target at all... And I definitely want to overwrite those_blank
s...@quhno said in Follower Tabs:
- A short check if it is a plain old link (Good, apply _thetarget) or a Javascript (do nothing) would be helpful too.
I thought about it too, although some "fancy" webmasters tend to use JS to simply open links and I'd like to catch those too. Might be too difficult, though.
@quhno said in Follower Tabs:
- Generating a UUID or something similar as target name (once) could help avoiding clashes with existing targets and allow follower tabs for multiple tabs.
Have you tested the script? I had no problems using multiple Follower Tabs with the same name. The tabs must be using different IDs than the name defined by the script. That's why I didn't even bother to manipulate with them.