Skip to content

Commit

Permalink
fix naming of page assets with URL query, see #10
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasGollenstede committed Jan 31, 2021
1 parent 49c9710 commit 581726c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/collect/about-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
const doc = document.querySelector('.container').cloneNode(true);

const resources = (await Promise.all(Array.from(doc.querySelectorAll('img'), async img => {
const { src, } = img, name = img.src = (await pathPrefix(src)) +'/'+ src.match(/[^/]*[/]?(?:[?]|#|$)/)[0];
const { src, } = img, name = img.src = (await pathPrefix(src)) +'/'+ new URL(src).pathname.split('/').pop();
return { src, name, };
})));
const title = doc.querySelector('.reader-title').textContent;
Expand Down

0 comments on commit 581726c

Please sign in to comment.