feat(html): change the more link

This commit is contained in:
imlonghao 2022-01-23 16:30:32 +08:00
parent 8e3d510fbc
commit 82b7dd274a
2 changed files with 3 additions and 4 deletions

View file

@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
- Use hashtag for more link
## [0.2.0] - 2022-01-23
### Added

View file

@ -16,9 +16,6 @@
<script src="https://cdn.jsdelivr.net/npm/datatables.net@1.10.20/js/jquery.dataTables.min.js"
integrity="sha256-LXQzPhL1IRyKkA7HpCOBi8I+OC8HqzHUYkjK8S+LKTs=" crossorigin="anonymous"></script>
<script>
function more(pkg) {
window.location.hash = "#" + pkg
}
$(window).on('hashchange', function () {
url = window.location.hash.includes("#") ? "/imlonghao-api/pkg/" + window.location.hash.slice(1) : "/imlonghao-api/logs"
$.get(url, function (newDataArray) {
@ -104,7 +101,7 @@
title: "更多",
data: "pkgbase",
render: function (data, type, row, meta) {
return `<a href="javascript:more('${data}')">更多</a>`
return `<a href=#${data}">更多</a>`
}
}
]