Skip to content

Commit

Permalink
fix with float chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
BastienBoymond committed Jan 18, 2023
1 parent 0465ecf commit 6a7c732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async function saveMangaName(mangaName) {
function saveReading(urlParams) {
const key = urlParams[0];
const type = urlParams[1].includes("volume-") ? "volume" : "chapter";
const value = {chapter: parseInt(urlParams[1].replace('volume-', '')), page: urlParams[2] === "" ? 1 : parseInt(urlParams[2]), type: type};
const value = {chapter: parseFloat(urlParams[1].replace('volume-', '')), page: urlParams[2] === "" ? 1 : parseInt(urlParams[2]), type: type};
store_value(key, value);
chrome.runtime.sendMessage({text: "update/" + key + "/" + value.chapter + "/" + value.type});
saveMangaName(key);
Expand Down

0 comments on commit 6a7c732

Please sign in to comment.