Closed dlh2 closed 2 years ago
We can enhance the code by using ES6 Modules so it's neatly rearranged, I'm not sure if you really want to change it as it will change the way we code xD
Two background files, let's do what we said at #35
Sounds good! We should import the DEFAULT_SCORE_LOWER_BOUNDS and DEFAULT_SCORE_UPPER_BOUNDS constant in options.js and experiments.js from the new constants file.
Furthermore there are some redundancies in the custom_score_column.js like the ones you have just fixed in the background.js. It would be good to optimize those, too.
Thanks again for the very good contributions!
On my way, I'm changing this little by little
experiment_apis aren't compatible with ES6 modules
I swapped your if replace to a for of and it seems faster:
Your RegEx seemed to odd for me, so I tried to change it and voilá a lot faster:
Later I found you make redundancy about the Bounds, so we'll make a function and let the job do on there.
Also, I suggest to use "Let" whenever the variable is going to change after.