+3
-8
skythread.js
+3
-8
skythread.js
···
103
103
104
104
function parseQueryParams() {
105
105
let params = new URLSearchParams(location.search);
106
-
let query = params.get('q');
107
-
let author = params.get('author');
108
-
let post = params.get('post');
109
-
let quotes = params.get('quotes');
110
-
let hash = params.get('hash');
111
-
let page = params.get('page');
106
+
let { q, author, post, quotes, hash, page } = Object.fromEntries(params);
112
107
113
108
if (quotes) {
114
109
showLoader();
···
116
111
} else if (hash) {
117
112
showLoader();
118
113
loadHashtagPage(decodeURIComponent(hash));
119
-
} else if (query) {
114
+
} else if (q) {
120
115
showLoader();
121
-
threadPage.loadThreadByURL(decodeURIComponent(query));
116
+
threadPage.loadThreadByURL(decodeURIComponent(q));
122
117
} else if (author && post) {
123
118
showLoader();
124
119
threadPage.loadThreadById(decodeURIComponent(author), decodeURIComponent(post));