From 0acc0ad90ce862d30c2c4480b64d65a2e3d10ca1 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 6 Apr 2016 21:04:38 -0700 Subject: [PATCH] Autoload when needed --- ext/bg/js/yomichan.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js index 05da4007..a66c1244 100644 --- a/ext/bg/js/yomichan.js +++ b/ext/bg/js/yomichan.js @@ -29,6 +29,10 @@ class Yomichan { chrome.runtime.onMessage.addListener(this.onMessage.bind(this)); chrome.browserAction.onClicked.addListener(this.onBrowserAction.bind(this)); + + if (this.options.loadOnStartup) { + this.updateState('loading'); + } }); }