This file contains 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
-- a patch for changing ToC title to book title | |
local Event = require("ui/event") | |
local UIManager = require("ui/uimanager") | |
local _ = require("gettext") | |
local ReaderToc = require("apps/reader/modules/readertoc") | |
local onShowToc_orig = ReaderToc.onShowToc | |
ReaderToc.onShowToc = function(self) | |
-- Run original code |
This file contains 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
-- a patch for KOReader to add a menu entry for usbnet toggle in the network menu | |
-- for usage on a Kobo eReader | |
local logger = require("logger") | |
local usbnet_toggle_path = "/usr/bin/usbnet-toggle" | |
if lfs.attributes(usbnet_toggle_path, "mode") == "file" then | |
local reader_menu_order = require("ui/elements/reader_menu_order") |
This file contains 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
#!/usr/bin/env luajit | |
--[[ | |
Adapted from https://gist.github.com/dpino/647b9d2e12aa8ff859b4 | |
Environment: Lenovo ThinkPad T520 / 16GB RAM / i7-3740QM CPU @ 2.70GHz | |
| pairs | ipairs | indexing | | |
| 1.000000 | 4.283464 | 4.058733 | | |
| 0.233456 | 1.000000 | 0.947535 | |
This file contains 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
-- A patch for updating a German.pattern file, if this is newer than the provide one. | |
-- quick and dirty; for my personal usage, will most likely not fit any other users needs | |
print("Update hyphenation patterns") | |
local language = "German" -- is someone wants to use this patch with another language | |
local xxx = "" -- add your location here | |
local lfs = require("libs/libkoreader-lfs") | |
local DataStorage = require("datastorage") |
This file contains 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
-- a patch for showing a message after an update of KOReader | |
local lfs = require("libs/libkoreader-lfs") | |
local DataStorage = require("datastorage") | |
local ffiutil = require("ffi/util") | |
local patch_dir = DataStorage:getDataDir() .. "/patches" | |
if lfs.attributes(patch_dir .. "/09-UpgradeMessage.lua", "mode") == "file" then | |
os.remove(patch_dir .. "/29-UpgradeMessage.lua") -- to be safe, as there coulde be a patch with that name ;) |
This file contains 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-no-keyboard-shortcuts.lua | |
-- | |
-- Hides keyboard shortcuts on devices with keyboard. | |
local Device = require("device") | |
Device.hasKeyboard = function () return false end |
This file contains 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
-- A KOReader patch for limiting the crash.log file size during run (and not only on KOReader start) | |
-- The menu entry can be found in Filemanager: Settings > More tools > Developer options > Limit log file size | |
-- Version 0.2 | |
-- Kobo os.execute("truncate") is not available -> os.execute("busybox truncate") | |
-- Version 0.3 | |
-- onSuspend and onResume work now | |
-- Version 0.4 | |
-- unschedule tasks in onClose |