From 2d12bfd1f546bb5a09df37003f4681b9c44ee097 Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 20 Dec 2017 08:37:57 +0300 Subject: [PATCH] l10n: actually stop observing --- js/localization.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/localization.js b/js/localization.js index f3c882fb..7c53cda1 100644 --- a/js/localization.js +++ b/js/localization.js @@ -182,8 +182,9 @@ function tDocLoader() { } function onLoad() { - tDocLoader.stop(); + document.removeEventListener('DOMContentLoaded', onLoad); process(tDocLoader.observer.takeRecords()); + tDocLoader.stop(); if (cacheLength !== Object.keys(t.cache).length) { localStorage.L10N = JSON.stringify(t.cache); }