diff options
author | Alessio Vanni <vannilla@firemail.cc> | 2019-03-02 16:43:47 +0100 |
---|---|---|
committer | Alessio Vanni <vannilla@firemail.cc> | 2019-03-02 16:43:47 +0100 |
commit | ebfc616b62694b5a982b728b93b6ad80cf6aadee (patch) | |
tree | 4c9a979e566e3d58eece2bf3e2fb744a6f5117ab /js/tab.js | |
parent | 3a583df6fb993e2722913174c75055cce0b7d5d4 (diff) | |
download | ematrix-ebfc616b62694b5a982b728b93b6ad80cf6aadee.tar.lz ematrix-ebfc616b62694b5a982b728b93b6ad80cf6aadee.tar.xz ematrix-ebfc616b62694b5a982b728b93b6ad80cf6aadee.zip |
Fix wyciwyg URLs
Ported from uMatrix.
Diffstat (limited to 'js/tab.js')
-rw-r--r-- | js/tab.js | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -50,6 +50,15 @@ var ηm = ηMatrix; return 'http://' + this.behindTheSceneScope + '/'; } + // https://github.com/gorhill/uMatrix/issues/992 + if (pageURL.startsWith('wyciwyg:')) { + // Matches strings like 'wyciwyg://101/' + let filter = /^wyciwyg:\/\/\d+\//.exec(pageURL); + if (filter) { + pageURL = pageURL.slice(filter[0].length); + } + } + // If the URL is that of our "blocked page" document, return the URL of // the blocked page. if ( pageURL.lastIndexOf(vAPI.getURL('main-blocked.html'), 0) === 0 ) { |