search.json.mozlz4

This board is for discussions, bug reports, etc. for pre-releases of the v28 milestone building on UXP.
Locked
User avatar
Fedor2
Astronaut
Astronaut
Posts: 675
Joined: 2016-04-11, 01:26

search.json.mozlz4

Post by Fedor2 » 2018-07-20, 18:35

In the uxp this is replaces search.json the compression reduce the size yes, but removes means to edit it, is it really worth?
I see ways:
1. reinstate regular text search.json without compression.
2. improve search edit function in the browser which is now poor or even useless.

What do you think?

More there is the mozzila addon mozlz4_edit, but initially made for the web extensions, can be launched as page but does not recognize object browser, do not know why, no time to deep inquire.

Furthermore it is can to edit xml files in the borwser\seachplugins and delete search.json.mozlz4 in all users pofiles

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 26170
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: search.json.mozlz4

Post by Moonchild » 2018-07-20, 19:12

The file search.json.mozlz4 (and search.json before that) is not a file you should ever edit -- it is a generated file with pre-parsed search engine data (a cache file). Since it only has to be machine-readable it makes sense to compress it for fast loading.
"There will be times when the position you advocate, no matter how well framed and supported, will not be accepted by the public simply because you are who you are." -- Merrill Rose
Image

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1935
Joined: 2015-09-03, 19:47
Location: UA
Contact:

Re: search.json.mozlz4

Post by JustOff » 2018-07-20, 20:03

Fedor2 wrote:More there is the mozzila addon mozlz4_edit, but initially made for the web extensions, can be launched as page but does not recognize object browser, do not know why, no time to deep inquire.

Code: Select all

--- js\app\App.js.orig	Fri Jul 20 23:00:43 2018
+++ js\app\App.js	     Fri Jul 20 23:00:48 2018
@@ -49,7 +49,7 @@
     }
 
     async initEngineExamples() {
-        const url = browser.runtime.getURL('app/resources/engines.json');
+        const url = 'resources/engines.json';
 
         return this.engineExamples = await (await fetch(url)).json();
     }
Here are the add-ons I made in a spare time. That was fun!

User avatar
therube
Board Warrior
Board Warrior
Posts: 1206
Joined: 2018-06-08, 17:02

Re: search.json.mozlz4

Post by therube » 2018-07-21, 15:35

It took me some reading & thinking & reading & thinking.
And I'm thinking the extension is a webextension, which won't work in PM.
And then I did some reading & thinking.

And then I realized the pertinent part:
Fedor2 wrote:can be launched as page
And with JustOff's fix, it works.
Neat.


(IOW, copy the /app/ directory out from mozlz4-edit, make the noted change, open \app\app.htm as a webpage in PM.)


(The 'Save as' functions return an error.)
(Manipulating large files [~2 MB .json] is rather slow.)
Last edited by therube on 2018-07-21, 15:50, edited 4 times in total.

Locked