diff --git a/plugin.js b/plugin.js index 0aa1df6..681a782 100644 --- a/plugin.js +++ b/plugin.js @@ -83,17 +83,9 @@ this.create = function (b) { body = b; - comp._onKey = function (e) { - if (e.key === 'Backspace' || e.key === 'Escape') { - e.preventDefault(); - Lampa.Activity.back(); - } - }; - document.addEventListener('keydown', comp._onKey, true); }; this.destroy = function () { - if (comp._onKey) document.removeEventListener('keydown', comp._onKey, true); }; // Wire up keyboard/remote navigation (pattern from Shikimori plugin). @@ -216,18 +208,9 @@ this.create = function (b) { body = b; - // Browser/keyboard fallback: Backspace / Escape -> back (remote uses Controller 'back') - comp._onKey = function (e) { - if (e.key === 'Backspace' || e.key === 'Escape') { - e.preventDefault(); - Lampa.Activity.back(); - } - }; - document.addEventListener('keydown', comp._onKey, true); }; this.destroy = function () { - if (comp._onKey) document.removeEventListener('keydown', comp._onKey, true); }; this.start = function () {