mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-13 04:01:40 +08:00
书籍页添加下载部分;获取URL参数考虑带#锚点情况;解决页面重复获取压缩字体问题
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
function getParams() {
|
||||
var params = {};
|
||||
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
|
||||
var parts = window.location.href.split('#')[0].replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
|
||||
params[key] = decodeURIComponent(value);
|
||||
});
|
||||
return params;
|
||||
|
Reference in New Issue
Block a user