diff options
| author | mrmr1993 | 2015-09-10 21:39:31 +0100 | 
|---|---|---|
| committer | mrmr1993 | 2015-09-10 22:02:45 +0100 | 
| commit | fe24f3c89fca9ac7a0f31eb175e3905946727e63 (patch) | |
| tree | d44103c7ba4267d37db0cb92d5f988c60b8055dd /lib/utils.coffee | |
| parent | 92052d5cb9d0f190c47d985d0e35ec1944483dab (diff) | |
| download | vimium-fe24f3c89fca9ac7a0f31eb175e3905946727e63.tar.bz2 | |
Don't decode javascript URIs on 46.0.2467.2 and later
The fix for Chromium issue 483000 landed in this version, so it is no
longer necessary for #1611
Diffstat (limited to 'lib/utils.coffee')
| -rw-r--r-- | lib/utils.coffee | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/lib/utils.coffee b/lib/utils.coffee index 90469fad..54cb38d2 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -144,7 +144,8 @@ Utils =      if Utils.hasChromePrefix string        string      else if Utils.hasJavascriptPrefix string -      Utils.decodeURIByParts string +      # In Chrome versions older than 46.0.2467.2, encoded javascript URIs weren't handled correctly by. +      if Utils.haveChromeVersion "46.0.2467.2" then string else Utils.decodeURIByParts string      else if Utils.isUrl string        Utils.createFullUrl string      else @@ -176,7 +177,7 @@ Utils =    # True if the current Chrome version is at least the required version.    haveChromeVersion: (required) -> -    chromeVersion = navigator.appVersion.match(/Chrome\/(.*?) /)?[1] +    chromeVersion = navigator.appVersion.match(/Chrom(e|ium)\/(.*?) /)?[2]      chromeVersion and 0 <= Utils.compareVersions chromeVersion, required    # Zip two (or more) arrays: | 
