Backup Search Engines
-
@potmeklecbohdan Oh sweet, thanks, I figured there was some way as simple as that.
When I run the snippet you posted though I get this:
Uncaught TypeError: Cannot read property 'local' of undefined at <anonymous>:1:16 (anonymous) @ VM78:1
And if I stick the whole contents of the custom.js (.user.js) in the console:
Uncaught TypeError: Cannot read property 'onUpdated' of undefined at <anonymous>:94:17
EDIT: nevermind! I hadn't bothered going to the settings/search page like you said. If I open up devtools after going into the settings page and THEN running the code, it works great. Thanks! That's freakin awesome. This has been such a headache for me for a while now and it was so easy..
-
@jdally987 Your problem was that you didnβt open the devtools for the user interface, but regular devtools β https://forum.vivaldi.net/topic/16684/inspecting-the-vivaldi-ui-with-devtools/
And yeah, the mod is just a fancy way of running the command directly in the console. Messing with the chromium storage directly can seriously mess up your data should you make a mistake. I know that because at one point I deleted all my themes this way. Not tragic if you make regular backups, which you should.
You could try and install Vivaldi into your home folder, which will allow you to edit its contents, should you want to do any other javascript modifications to the UI, which canβt be done from the devtools. CSS mods can be installed native these days, so they pose no problems for you currently. -
-
I wanted to mention that the search engines backup, when stored as note, can potentially slow down quick commands input to a crawl. Itβs a massive amount of text, especially if you have removed and added a lot of entries. Last I checked my backup had over 120k characters. This happens because removed engines are kept in storage by Vivaldi. If you are careful, you can edit the backup yourself and delete removed engines. Alternatively you can store it outside of Vivaldi, or deactivate the notes search type in
vivaldi://settings/qc/
. -
@luetage It seems like we still have to rely on this mod going forward. Because of the issues with quick commands I decided to implement a filter on backup to get rid of removed engines. Additionally the history IDs will be setup anew to produce clean code. To try out the new version I would suggest to first make a backup of your current engines, then implement the mod, create another backup and check it in the console. There should be no issues and I havenβt run into any so far, but better safe than sorry. To use the cleaned backup directly, simply import it.
-
@luetage thank you for the mod
I moved a bunch of my search engines without much hassle and learned that since quite some time ago Vivaldi can actually retain CSS mods that I've been importing manually after every update -
Thank you for this awesome mod!
Now we just need quick commands and keyboard shortcuts
-
I take it this mod will no longer be updated now that syncable search engines are coming?
Also, I tried using the following inside the console in the newest snapshot to manually change the favicon without this mod (I don't have js mods installed in my snapshot install):
chrome.storage.local.get({'SEARCH_ENGINE_COLLECTION':''}, d => console.log(JSON.stringify(d.SEARCH_ENGINE_COLLECTION)))
But it no longer seems to work, so I assume this mod will likewise not work.
-
@altcode The collection is no longer in the local chrome storage. Iβd have to check. But yes, now that we got sync I donβt know whether there is enough interest and whether it makes sense to continue such a mod. Funnily enough the first thing I missed was setting certain engine icons to emoji. It was an eye candy for search through quick commands.
-
Search engine collection are in
vivaldi.searchEngines
in the latest versionvivaldi.searchEngines.getTemplateUrls().then(console.log)
-
@tam710562 Good find, I thought there was no api anymore. This means we could still implement the backup with little changes and continue this. The UI for the mod never broke. Iβll take a look at it. It also seems like deleted engines no longer contaminate the array, so thatβs a plus and something we can write out of the mod.
-
Search Engines are now stored in the
Web Data
(SQLite DB) file, so browsable and backupable. Should also be able to edit favicon directly, needs some SQLite tool of course.But having a backup option directly in settings UI is great of course
-
-
@barbudo2005 full path for me is "%localappdata%\Vivaldi\User Data\Default\Web Data"
copy as *.db3 and edit with https://sqlitebrowser.org for example
The table name is "keywords"
the field "is_active" can be 0,1 or 2 and the ones marked 2 appear to be the deleted ones, probably just marked to be purged later -
I don't find it in 5.1.2567.73 (Stable channel) (64-bit).
-
@pathduck One thing to note is that Vivaldi explicitly warns against changing files in the profile without an api in its README file. But then again we have pinned topics in the forum and articles on Vivaldi help, which explain how to copy, change files in the profile.
-
@barbudo2005 we're on current snapshot, Vivaldi 5.2.2623.4
-
@barbudo2005 Yeah, sorry my bad - I should've been clearer in that this is only in Snapshot for now...
@luetage Yes, hacking profile DB files directly is definitely not supported. If you do it - make backups backups backups! I just like to live dangerously
Looking at the DB table, there's not really anything that looks like it might cause major problems if for instance trying to insert rows directly, apart from maybe the
sync_guid
which has to be unique and could cause sync duplicates etc.Of course trying to insert a row with an already existing
keyword
value could potentially cause a crash depending on how it's handled. Might even be what caused the GSOD for me, as I always overridey
for YouTube andb
for Bandcamp ... as anyone would with any sense wouldFor backup purposes one could export the non-standard (i.e.
id
< 10) rows as SQL, for later restore if needed.I'm curious what the BLOB(VARCHAR)
position
value is though -
@pathduck Said:
Yes, hacking profile DB files directly is definitely not supported. If you do it - make backups backups backups!
If I backup the file, make a copy to modify and I screwed up the file so when I replace the original with the copy Vivaldi crash.
The question is:
If I replace the copy with the original, everything will return to normal?
-
@barbudo2005 Yes, as long as you backup it should be fine. Again, of course don't trust me - do your own experiments
Also, if you're still on Stable, leave it alone.
Just did a quick experiment at least it didn't crash
But yeah - don't do thisAlso this topic is for Luetage's excellent mod so let's keep it to discussing it and not the new DB