aboutsummaryrefslogtreecommitdiffstats
path: root/js/tab.js
diff options
context:
space:
mode:
authorAlessio Vanni <vannilla@firemail.cc>2019-03-02 16:43:47 +0100
committerAlessio Vanni <vannilla@firemail.cc>2019-03-02 16:43:47 +0100
commitebfc616b62694b5a982b728b93b6ad80cf6aadee (patch)
tree4c9a979e566e3d58eece2bf3e2fb744a6f5117ab /js/tab.js
parent3a583df6fb993e2722913174c75055cce0b7d5d4 (diff)
downloadematrix-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.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/tab.js b/js/tab.js
index 09bbef8..2d6af4a 100644
--- a/js/tab.js
+++ b/js/tab.js
@@ -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 ) {