Skip to content

Commit

Permalink
fix the item page
Browse files Browse the repository at this point in the history
  • Loading branch information
antihax committed Apr 5, 2023
1 parent e2ca8df commit a9f54d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/atlasmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ function setupMap(config) {

if (config.ItemLink)
L.easyButton('<div>📝</div>', function () {
window.open('items.html', '_self');
const params = new URLSearchParams(window.location.search);
let v = params.get('v');
if (v === null) v = "";
else v = parseInt(v) + 1;
window.open('items.html?v='+params.get('v'), '_self');
}).addTo(map);

if (config.KofiLink)
Expand Down
2 changes: 1 addition & 1 deletion src/items.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
return obj.Name;
},
prefetch: {
url: '/json/items.json',
url: '/json'+version+'/items.json',
filter: function(list) {
return $.map(list, function(v, k) {
if (!v.ClassName)
Expand Down

0 comments on commit a9f54d0

Please sign in to comment.