AutoSave Sessions Mod
-
@nparekh see screenshots:
-
@stardepp i dont have the menu button, i hid the vivaldi icon
-
@nparekh Use whatever keyboard shortcut you have assigned to the action.
-
@bonetone Then press the F2 key and the quick commands will open and type into the search field "Open saved session".
-
@stardepp Yup, that works too, except for me it's a different shortcut to launch quick commands. There's also a keyboard shortcut to bring up a cheat sheet displaying all the keyboard shortcuts you have set. It won't display actions that have no shortcuts assigned. I don't remember what the default is for that, my keyboard shortcut won't be of use, but you can look it up in the settings.
Edit, but it's not "then" use quick commands, if you use the shortcut assigned to that action there is no need to use quick commands. Assigning easy shortcuts to the actions you use often will save time over always using quick commands, but those are really useful for actions you don't remember the shortcut for, among other things. Quick commands is quite powerful, especially after configuring it to work how you prefer.
-
@bonetone said:
Edit, but it's not "then" use quick commands, if you use the shortcut assigned to that action there is no need to use quick commands.
The then was meant as something like βIf that is not your case and you also don't want to use this (β¦), then this should work for you.β
-
Sorry for I really am no skill in CSS stuffs like what is talking in this thread.
Please advise me how I am able to insert/install the CSS to the folder and let Vivaldi recognize it ?
I understand & I can reach until File, setting , appearance..... but nothing more I can understand to do.
Thank you very much.
edmond. -
@eeeemc see the first pinned post in this category
-
@LonM Thank you. Could be posible to save the session with the name of the first tab?
To remember better what is about.
-
@barbudo2005 that would be doable.
Does anyone else think this would be a useful feature?
-
@LonM I'd prefer if it pulled the name of the first tab group. If the user has given a name to the group, that's because this is what they want to see to know what it is about. If the user hasn't given a name to the group, then it will the name of the most recent active tab. Ideally, in my opinion, the mod would skip over loose tabs if groups exist and grab the name of either the first group or largest group. Perhaps, it could even skip over unnamed groups if another group exists and has been named.
I write all this not knowing how or even if we can distinguish between a group that has been given a name and that which is just displaying a tab's title. Though Vivaldi is able to distinguish, it doesn't change the group name when the user has modified it, so there is something there.
-
Once again i'm late to the party... i did not know of this clever mod til some hours ago today, alerted by @BoneTone's https://forum.vivaldi.net/post/400345. The timing is rather exquisite, given my shock discovery this evening that chromium 86 has broken my hitherto successful tabs backups, per my https://forum.vivaldi.net/post/400417.
I've now added this bit of further @LonM genius-work to both Stable's & Snapshot's
custom.js
& verified that in both it's working a treat. I have noticed however one little thing to quibble about.It assigns a timestamp that is UTC, not local time. Inspecting the few other pics of sessions already posted in this thread let me confirm it's not just unique to me -- others' also have what seems to be UTC.
Is there a simple code tweak possible pls to use local rather than UTC for the assigned timestamps?
-
@Steffie one thing to consider, I suspect that a simple change to just pull the local system time for naming the sessions will likely lead to some funky behavior twice a year in most locales. Right around this time of year there can be hiccups as some newer sessions appear to be older than existing sessions after the clocks roll back to Standard Time. UTC isn't affected by Daylight Saving clock changes so it avoids this problem. In the Spring, some sessions will appear older than they actually are, and be deleted too soon.
Addressing these issues takes a lot more code than is required for just using UTC. I can understand the desire to want to see local time, but there should be a warning included next to the option about this possibility.
-
@Steffie That should be doable, but there are some concerns I have which may delay a fix:
- The session name is also the filename, so lots of care needs to be taken that changing the format won't produce filenames that are invalid on certain OSes, or clash with vivaldi's idea of what a valid filename is
- As @BoneTone says, changing how data is stored when dealing with timezones is very tricky. The name and timestamp should be separate, but i will need to investigate further.
Apologies to all people in this thread if my anglo/UTC0-centric development has caused issues, I will try and have a look at how this could be corrected
-
@LonM I don't consider UTC to be anglo-centric, it's right there in the name -- universal. Though it's a bit of a misnomer, global would be more accurate. I doubt the universe runs on Earth time. You include the Z for Zulu in the name, following the standard convention.
-
@BoneTone said in AutoSave Sessions Mod:
hiccups as some newer sessions appear to be older than existing sessions after the clocks roll back to Standard Time
You make an excellent point i'd not considered, however... I entirely blame Cher...
https://www.youtube.com/watch?v=GgD9FyE60hs
@LonM said in AutoSave Sessions Mod:
Apologies to all people in this thread if my anglo/UTC0-centric development has caused issues
OMZ pls, no. The very last thing i wanted to do was to wring some apology from you. It's totally not necessary or warranted. My gosh you do such great stuff for our community, thank you.
-
Alright, so I think I've got part of a solution.
I am very much reminded of a youtube video with Tom Scott where he talks about programming and time zones. His point boils down to "Let someone else handle it".
Having dealt with these bugs, I must say I very much agree with him.
Developments:
- It turns out that there is no date formatter in javascript native to browsers
- Including a full formatting library would take up several kbs, and I'm not doing that
- Vivaldi has some kind of library but it's hidden away inside one of the bundles and I can't access it
- Native JS 4 date formatters and a lot of getters to build custom strings. I've the one that does a decent job
- I've moved the whole thing to a separate method, so if someone wants to build and share their own, they just have to share that method and everyone else can easily drop it in if they want to use it
- Vivaldi's sessions doesn't seem to save daylight savings, just an absolute time, this may be a bug with vivaldi, or may be intended
- If anyone else knows how to handle daylight savings, feel free to hack away at the code to fix it. Any data loss should be limited to, at most, 1 hour on the evening your country changes time zone. I have no idea how to handle daylight savings time, so I've given up even trying! αΰΌΌΰΊΩΝΰΊΰΌ½α
I will test the changes for a bit, and update the main post if I'm happy with it. This also applies to the sessions panel mod, but there's no problem of data loss there. The worst that could happen is the sort order gets a bit funny.
-
@LonM said in AutoSave Sessions Mod:
he talks about programming and time zones. His point boils down to "Let someone else handle it"
That used to be me. I'm a bit of a time nerd, it's fascinating, thus in my various QA roles I was always the one to spot & correct time related issues, including time zones, as well as
daylight savings
There is no s in
daylight saving time
. It's an extremely common error. If your dog has to go to the bathroom, it needs to be walked and it's dog walking time, not dog walkings time. Same thing with daylight saving time.When talking about a location's time zone, it's often best to leave out the standard or daylight. New York is in the Eastern Time zone of the United States, it's only on Eastern Standard Time or Eastern Daylight Time for part of the year.
-
@BoneTone said in AutoSave Sessions Mod:
daylight savings
I have always called it that, with an s. It is the time when you save daylight, i.e. you get daylight savings.
Like my bank account: I save money, I make money savings, so it's a savings account.
And yes, it looks very likely I'll have to just ignore any special time rules because all I have to go on is a timestamp like
1592837180229.7
, so any conversion will need to take place relative to the current timezone. This could pose a problem if you're using a laptop and go on holiday far away. -
@LonM said in AutoSave Sessions Mod:
Like my bank account: I save money, I make money savings, so it's a savings account.
The difference between the two is that your savings account is a nounal adjective, while daylight saving time is a verbal adjective. The account holds your savings (a noun), the time-shift saves (a verb) daylight for the evening after work. Technically it would be better as daylight-saving time, such as a mind-expanding experience. As I said, it's an extremely common error; so common that some references include it as accepted usage. The use of the participle (saving) is the original and more grammatically correct, as well as the official termβ‘, even if it feels funky and has become less common. Locales that use the term Summer Time avoid this confusion all together.
Funnily enough, this page uses the savings account as an example for why people get it wrong. To put it all together, we could say that one of the primary justifications for daylight saving time is the energy savings it creates.
β‘ official - you won't find savings on a website like NIST