diff options
-rw-r--r-- | index.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/index.js b/index.js index bab2c5e..cce07fa 100644 --- a/index.js +++ b/index.js @@ -18,7 +18,9 @@ var url = new URL(document.location.href); var target = url.searchParams.get("url"); if (target !== null) { - var project = target.match(/^web\+ganarchy\:([a-fA-F0-9]+)$/); + // accepts both web+ganarchy:fae and + // web+ganarchy://example.org/fae + var project = target.match(/^web\+ganarchy\:(?:\/\/[^\\/?#]+[\\/])([a-fA-F0-9]+)$/); if (project !== null) { // some browsers don't like it when you set this directly url.search = ""; |