Closed An-dz closed 3 years ago
The UserScript version is not working because of the check for storage is broken on Chromium browsers.
https://github.com/Kir-Antipov/GitHub-Defreshed/blob/5b7a08d6706938d41b154d8175037e8e7238dfa1/src/tools/storage.js#L99-L105
https://github.com/Kir-Antipov/GitHub-Defreshed/blob/5b7a08d6706938d41b154d8175037e8e7238dfa1/src/tools/storage.js#L78-L81
The problem is that @getAvailableStorage line 101 new ExtensionStorage(chrome) actually runs because chrome is a global on Chromium browsers but it lacks storage. So to skip it we also need to check if storage exists.
@getAvailableStorage
new ExtensionStorage(chrome)
chrome
storage
Whoops, I thought that chrome works the same way as browser in Firefox, which exists only in web extension environment. What a shame :D
browser
Thanks a lot for pointing this out and fixing it, deeply appreciate that!
Description
The UserScript version is not working because of the check for storage is broken on Chromium browsers.
https://github.com/Kir-Antipov/GitHub-Defreshed/blob/5b7a08d6706938d41b154d8175037e8e7238dfa1/src/tools/storage.js#L99-L105
https://github.com/Kir-Antipov/GitHub-Defreshed/blob/5b7a08d6706938d41b154d8175037e8e7238dfa1/src/tools/storage.js#L78-L81
The problem is that
@getAvailableStorage
line 101new ExtensionStorage(chrome)
actually runs becausechrome
is a global on Chromium browsers but it lacks storage. So to skip it we also need to check ifstorage
exists.Other information