diff options
author | sualko <klaus@jsxc.org> | 2018-05-11 13:32:34 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2018-05-11 13:32:34 +0300 |
commit | fbb5d61f250e4d773145420cc092fa108d4675cc (patch) | |
tree | 70ac25aa26f49f64d8be00107796849f0226af0a | |
parent | 7de303848aa742371b96e4cf4903552a5e7d93c4 (diff) |
fix shorten urls
-rw-r--r-- | js/track.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/track.js b/js/track.js index c3a4689..88eb3cd 100644 --- a/js/track.js +++ b/js/track.js @@ -40,7 +40,7 @@ var _paq = _paq || []; function track(options) { var app = null; var path = window.location.pathname; - var pathparts = path.match(/index\.php\/apps\/([a-z0-9]+)\/?/i) || path.match(/index\.php\/([a-z0-9]+)(\/([a-z0-9]+))?/i) || []; + var pathparts = path.match(/(?:index\.php\/)?apps\/([a-z0-9]+)\/?/i) || path.match(/(?:index\.php\/)?([a-z0-9]+)(\/([a-z0-9]+))?/i) || []; if (pathparts.length >= 2) { app = pathparts[1]; |