Follower Tabs
-
@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.
-
@pafflick About Javascript links and existing targets: The problem could be that they use it for some kind of cross frame (not cross site) messaging which would break if you replace it - but I must admit that those techniques are rarely seen nowadays.
-
For a variety of reasons [including but not necessarily only: expanding senility, various distro changes, periods of defaulting to FF-Nightly over V-SS] i had forgotten all about this nice mod. I am happy to report here that in the latest Linux Snapshot & Stable atm, after copying the JS into the specified sub-directory & relaunching, this mod continues to work very nicely. Yay [& once more, onya @pafflick ].
As an experiment i did alternatively try it instead in the
hooks
sub-directory, & it did indeed load upon relaunch, but it did not work properly... so ... back to the original respective locations!
Oh, important discovery. Need to use Tabs setting to be NOT the auto-stacking one, coz then
Weird Stuff Happens
. -
Has anyone tried this mode with the new chain commands?
-
@pafflick said in Follower Tabs:
Method 1 - Bookmarklet
Persistent through browser updates, not persistent on page refresh
- Save the following code as a bookmark:
javascript:var linksArr=document.getElementsByTagName("a");for(i=0;i<linksArr.length;i++){linksArr[i].setAttribute("target","followertab");};
- Put the bookmark on your bookmarks bar or wherever you find the most convenient for you.
- Call this bookmark whenever you want to make the active tab the "origin" tab. The "follower" tab will be created once you visit any link from the origin tab (see explanation above).
Remember that once you change content on the origin tab (by either refreshing the page or loading any new content into it), the links on that page won't use the follower tab any more. Use the bookmarklet again, to restore the link between the origin tab and the follower tab.
I tried this and found this doesn't work on some sites but can't find reasons or common points and, it's confusing, at first this works for them.
Of cource I don't refresh and load more contents.One of the sites I found is Bluesky but this contents is changec by users, I found a site which this bookmarklet doesn't work is following Japanese page: https://yamdas.hatenablog.com/
Edit:
Sorry, I noticed this doesn't work only for Link Card, theirtarget
remains_blank
and normal links works.
I also noticed for Bluesky, static links work, such asFeedback Privacy Terms Help
. But links of posts doesn't work even iftarget
is changed tofollowertab
.