diff --git a/base b/base index 03267b1e1..66aa4585d 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit 03267b1e195b811abeaf47a4a158d414a0e28d2b +Subproject commit 66aa4585de16f289f5476ce758f001ce507041a3 diff --git a/frontend/ui/data/css_tweaks.lua b/frontend/ui/data/css_tweaks.lua index 60061b9c8..e8c9aa001 100644 --- a/frontend/ui/data/css_tweaks.lua +++ b/frontend/ui/data/css_tweaks.lua @@ -257,10 +257,23 @@ width: 100% !important; css = [[img { vertical-align: middle; }]], }, }, - -- No current need for Miscellaneous - -- { - -- title = _("Miscellaneous"), - -- }, + { + title = _("Miscellaneous"), + { + id = "epub_switch_show_case"; + title = _("Toggle alternative EPUB content"), + description = _([[ +The EPUB3 format allows a + +construct to provide alternative content to engines that support optional features. +KOReader currently falls back to hiding all content and shows the content (usually an image). +This tweak toggles this behavior, and may show the content as plain text.]]), + css = [[ +switch > case { display: inline; } +switch > default { display: none; } + ]], + }, + }, -- No current need for workarounds -- { -- title = _("Workarounds"), diff --git a/spec/unit/readerfooter_spec.lua b/spec/unit/readerfooter_spec.lua index 2d28ccc97..630a36843 100644 --- a/spec/unit/readerfooter_spec.lua +++ b/spec/unit/readerfooter_spec.lua @@ -146,7 +146,7 @@ describe("Readerfooter module", function() local timeinfo = footer.textGeneratorMap.time() local page_count = readerui.document:getPageCount() -- stats has not been initialized here, so we get na TB and TC - assert.are.same('1 / '..page_count..' | '..timeinfo..' | => 1 | B:0% | R:0% | TB: na | TC: na', + assert.are.same('1 / '..page_count..' | '..timeinfo..' | => 0 | B:0% | R:0% | TB: na | TC: na', footer.footer_text.text) end) diff --git a/spec/unit/readerrolling_spec.lua b/spec/unit/readerrolling_spec.lua index d5d270136..27325fbae 100644 --- a/spec/unit/readerrolling_spec.lua +++ b/spec/unit/readerrolling_spec.lua @@ -186,13 +186,13 @@ describe("Readerrolling module", function() it("should show pages for different word gap", function() readerui.document:setSpaceCondensing(100) readerui:handleEvent(Event:new("ChangeScreenMode", "portrait")) - assert.are.same(267, readerui.document:getPageCount()) + assert.are.same(266, readerui.document:getPageCount()) readerui.document:setSpaceCondensing(75) readerui:handleEvent(Event:new("ChangeScreenMode", "portrait")) - assert.are.same(262, readerui.document:getPageCount()) + assert.are.same(261, readerui.document:getPageCount()) readerui.document:setSpaceCondensing(50) readerui:handleEvent(Event:new("ChangeScreenMode", "portrait")) - assert.are.same(248, readerui.document:getPageCount()) + assert.are.same(247, readerui.document:getPageCount()) end) end) diff --git a/spec/unit/readersearch_spec.lua b/spec/unit/readersearch_spec.lua index 2029e550e..5d6b8b892 100644 --- a/spec/unit/readersearch_spec.lua +++ b/spec/unit/readersearch_spec.lua @@ -67,7 +67,7 @@ describe("Readersearch module", function() it("should find the last occurrence", function() -- local logger = require("logger") -- logger.info("nb of pages", doc:getPageCount()) - -- 20181206: currently 267 pages + -- 20181208: currently 266 pages for i = 100, 180, 10 do rolling:onGotoPage(i) local words = search:searchFromEnd("Verona")