Rob--W/cookie-manager

Chrome error when activated

CollinChaffin opened this issue · 1 comments

I know you haven't posted to the Chrome store, but since everything states Chrome compatible as a DEV obviously can still load/use. Was wondering the purpose of this:

ake-api-snippet.js:79 (anonymous function)

if (window.chrome && window.chrome.cookies) {
    throw new Error('Do not load fake-api-snippet.js in an extension!');
}

Everything seems to function perfectly in Chrome and I love extensions and efforts like this! I only ask since it installs by default in error trap mode enabled (I can simply disable to make this ugly error disappear but would rather not have to) it's a bit annoying to see it immediately throwing this dummy error. :)

snag_1-12-2019_11-19-29

The extension was originally written for direct use in Chrome (loading the repo itself as an extension at chrome://extensions or --load-extension= flag). Later I added support for running it directly from a file server (without other changes) to make testing on mobile easier (because Firefox for Android supports extensions).

The warning is not causing any loss of functionality, and since I haven't published the Chrome extension yet, I haven't made this a very high priority either. The build script acknowledges this issue though:

# TODO: Remove fake-api-snippet.js like Firefox.

If you want to load it as an extension without more complicated build steps, I suggest that you truncate the contents of fake-api-snippet.js.