This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 2-unified-autosync.lua - KOReader Auto Sync Patch | |
| -- Place in /storage/emulated/0/koreader/patches/ | |
| -- | |
| -- Features: | |
| -- - Syncs Highlightsync, Statistics, and Vocabulary Builder automatically | |
| -- - Robust Highlightsync detection with fallback (from v2.5) | |
| -- - Global cooldown prevents double-syncing (from v2.5) | |
| -- - Stable Vocabulary sync (from v3.2) | |
| -- - Smart reload detection prevents infinite loops | |
| -- - Configurable triggers (open, close, suspend) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| This user patch adds a "header" into the reader display, similar to the footer at the bottom. | |
| Modified to show: Time & Battery (left) | Author — Title (center) | R: percentage | pages (right) | |
| Features: | |
| - Configurable sections (easily turn on/off what appears in each area) | |
| - Dynamic separator matching footer settings | |
| - Battery charging indicator and icon toggle | |
| - Smart space calculation with minimum spacing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- anki-modify.lua - Version that uses proper EPUB navigation for page mapping | |
| local logger = require("logger") | |
| logger.info("=== ANKI CONTEXT PATCH LOADING ===") | |
| local function patch_anki_note() | |
| local success, AnkiNote = pcall(require, "ankinote") | |
| if not success then | |
| logger.warn("Anki Context Patch: Could not load ankinote module") | |
| return false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| KOReader Patch: File Modification Warning | |
| Alerts when book files may have been modified since sync hash was calculated | |
| --]] | |
| local ConfirmBox = require("ui/widget/confirmbox") | |
| local DocSettings = require("docsettings") | |
| local UIManager = require("ui/uimanager") | |
| local InfoMessage = require("ui/widget/infomessage") | |
| local lfs = require("libs/libkoreader-lfs") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Hardcover Auto-Quote Final Patch | |
| -- Uses the official HardcoverNote event from plugin v0.1.3 | |
| local logger = require("logger") | |
| local Event = require("ui/event") | |
| local UIManager = require("ui/uimanager") | |
| logger.info("=== HARDCOVER AUTO-QUOTE FINAL PATCH LOADING ===") | |
| -- Hook into ReaderHighlight |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local ProgressWidget = require("ui/widget/progresswidget") | |
| local Blitbuffer = require("ffi/blitbuffer") | |
| -- Progress bar colors | |
| local PROGRESS_FILL_COLOR = Blitbuffer.colorFromString("#00AA00") -- Darker, more saturated green | |
| local PROGRESS_BORDER_COLOR = Blitbuffer.COLOR_BLACK | |
| local PROGRESS_BG_COLOR = Blitbuffer.COLOR_WHITE | |
| -- Chapter icon colors | |
| local CHAPTER_ICON_COLOR = Blitbuffer.COLOR_BLACK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local readerFooter = require("apps/reader/modules/readerfooter") | |
| local ProgressWidget = require("ui/widget/progresswidget") | |
| local BD = require("ui/bidi") | |
| local Blitbuffer = require("ffi/blitbuffer") | |
| local Geom = require("ui/geometry") | |
| local Math = require("optmath") | |
| local Screen = require("device").screen | |
| -- Threshold for initial position marker | |
| local INITIAL_MARKER_HEIGHT_THRESHOLD = Screen:scaleBySize(12) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 2-chapter-title-spacing.lua | |
| -- Fix for chapter title truncation in footer | |
| local logger = require("logger") | |
| logger.info("=== CHAPTER TITLE SPACING FIX STARTING ===") | |
| -- Wait for UI to load, then modify the footer text fitting behavior | |
| local UIManager = require("ui/uimanager") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- User patch to hide JPG and JPEG files in Project Title Library Mode | |
| -- This hooks into the CoverMenuGenItemTable function as suggested by Project Title dev Joshua Cant | |
| local function filterJPEGFiles(items) | |
| local filtered_items = {} | |
| for i, item in ipairs(items or {}) do | |
| local filename = item.text or "" | |
| local filepath = item.path or "" | |