diff --git a/lib/ComicBook.js b/lib/ComicBook.js index 28c867d..0e2ccad 100755 --- a/lib/ComicBook.js +++ b/lib/ComicBook.js @@ -5,6 +5,7 @@ Fo sho: - README with build instructions + - only trigger navigate event on page change (not resize, etc.) - fix manga mode - trigger preload if requesting valid but not loaded images (can happen if network was interupted) - loading and generally hackiness of pointer is buggy, fix. @@ -791,14 +792,19 @@ function ComicBook(id, srcs, opts) { ComicBook.prototype.destroy = function () { - $("#cb-loading-overlay, #cb-status, #cb-color, .cb-control, .cb-toolbar, #cb-width-shiv").remove(); + $.each(book.controls, function (name, $control) { + $control.remove(); + }); + canvas.width = 0; canvas.height = 0; + window.removeEventListener("keydown", self.navigation, false); window.removeEventListener("hashchange", checkHash, false); + setHash(''); - $(this).trigger("destroy"); + // $(this).trigger("destroy"); } }