Fixes for Orion Browser #3610
Description
This pull request has some reference to issue #3610. But mainly this pull request is so we can run Vimium in Orion. For those that don't know, Orion is a WebKit based browser that is attempting to support both Chrome and Firefox extensions alike.
I believe Vimium was working previously for the most part but then something to do with settings parsing broke it I believe. The issue I found was that WebKit's support for JSON.parse() seems to have a few issues.
-
There was a
^symbol invimium.cssthat WebKit'sJSON.parse()didn't know how to handle when iterating and parsing through the settings keys insettings.js: migrateSettingsIfNecessary(settings). -
WebKit's
JSON.parse()struggled again in the same iterator when given an item that was not a stringified JSON object. So a simple validation was added in so only stringified JSON objects would be parsed.
After these fixes were made I tested it with Orion Version 0.99.126.4.1-beta (WebKit 618.1.2).
A small formatting fix was also made.
Hang on, sorry I just found an additional bug when using the / search command of Vimium. I'll work on fixing this.
TypeError: node.checkVisibility is not a function. (In 'node.checkVisibility()', 'node.checkVisibility' is undefined)
Any news on this one? I want to help! I think I have some more bugs and I want to see if I can contribute.