Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/css/lrr.css
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ p#nb {
font-size: 15em;
margin: -3.9375rem auto 0;
text-align: center;
z-index: 999
}

#overlay-shade {
Expand Down
7 changes: 3 additions & 4 deletions public/js/mod/reader_archive_overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { state, goToPage, loadContentData, stopAutoNextPage, toggleOverlay, getCurrentChapter, getArchiveForPage } from "./reader_common.js";

export function initializeArchiveOverlay() {
$(document).on("click.toggle-archive-overlay", "#toggle-archive-overlay", toggleArchiveOverlay);
$(document).on("click.edit-metadata", "#edit-archive", () => LRR.openInNewTab(new LRR.ApiURL(`/edit?id=${state.id}`)));
$(document).on("click.delete-archive", "#delete-archive", () => {
const isTank = state.id.startsWith("TANK_");
Expand Down Expand Up @@ -189,15 +188,15 @@
// Otherwise, update chapter and overlay -- If there are no chapters defined, just show all pages
state.currentChapter = getCurrentChapter();
let firstPage = state.currentChapter ? state.currentChapter.startPage : 1;
let lastPage = state.currentChapter ? state.currentChapter.endPage : state.pages.length;
let lastPage = state.currentChapter ? state.currentChapter.endPage : state.pages.value.length;

$("#overlay-section").text(state.currentChapter ? state.currentChapter.name : I18N.ReaderPages);

if (state.currentChapter !== null) {
// Create <select> options for jumping to other chapters
let chapterOptions = `<select class="favtag-btn" id="chapter-select">`;
if (state.content.chapters) {
state.content.chapters.forEach((chapter) => {
if (state.content.value.chapters) {
state.content.value.chapters.forEach((chapter) => {
const selected = (state.currentChapter && chapter.startPage === state.currentChapter.startPage) ? "selected" : "";
chapterOptions += `<option value="${chapter.startPage}" ${selected}>${LRR.encodeHTML(chapter.name)}</option>`;

Expand Down Expand Up @@ -262,7 +261,7 @@
}

export function checkStampedPages() {
const { arcId, localPage } = getArchiveForPage(state.currentPage + 1);

Check warning on line 264 in public/js/mod/reader_archive_overlay.js

View workflow job for this annotation

GitHub Actions / ESLint

'localPage' is assigned a value but never used. Allowed unused vars must match /^_/u
Server.callAPI(`/api/archives/${arcId}/stamps/`, "GET", null, I18N.ServerInfoError,
(data) => {
$("#extract-spinner").hide();
Expand Down
Loading
Loading