You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2022/01/04 14:03:12 UTC
[incubator-ponymail-foal] 01/03: pathname has already dropped the query
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 042bc0a4c44dce2e0c8b1403051c3d530bf1870a
Author: Sebb <se...@apache.org>
AuthorDate: Tue Jan 4 14:00:08 2022 +0000
pathname has already dropped the query
---
webui/js/source/primer.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/webui/js/source/primer.js b/webui/js/source/primer.js
index 30c6bc4..2ea27af 100644
--- a/webui/js/source/primer.js
+++ b/webui/js/source/primer.js
@@ -146,11 +146,12 @@ function parseURL(state) {
// Parse a permalink and fetch the thread
+// URL is expected to be of the form <msgid>?<list.id>
// onload function for thread.html
function parse_permalink() {
// message id is the bit after the last /
- let mid = location.href.split('/').pop();
- mid = mid.replace(/\?.*/, ''); // Chop away any query string
+ // TODO: could look for thread[.html]/ instead
+ let mid = location.pathname.split('/').pop();
// List-ID specified?
const query = unescape(location.search.substr(1));
let list_id = null;