diff --git a/src/js/background.js b/src/js/background.js
index 021bed3..ff4eaef 100644
--- a/src/js/background.js
+++ b/src/js/background.js
@@ -270,23 +270,8 @@
     return navigator.userAgent.toLowerCase().indexOf(operationSystem) > -1;
   },
 
-  executeScriptsInExistingTabs: function() {
-    chrome.windows.getAll(null, function(wins) {
-      for (var j = 0; j < wins.length; ++j) {
-        chrome.tabs.getAllInWindow(wins[j].id, function(tabs) {
-          for (var i = 0; i < tabs.length; ++i) {
-            if (tabs[i].url.indexOf("chrome://") != 0) {
-              chrome.tabs.executeScript(tabs[i].id, { file: 'js/page.js' });
-            }
-          }
-        });
-      }
-    });
-  },
-
   init: function() {
     localStorage.screenshootQuality = localStorage.screenshootQuality || 'png';
-    screenshot.executeScriptsInExistingTabs();
     screenshot.addMessageListener();
   }
 };
diff --git a/src/js/options.js b/src/js/options.js
index bbbce70..abb2efc 100644
--- a/src/js/options.js
+++ b/src/js/options.js
@@ -28,9 +28,11 @@
 }
 
 function save() {
-  localStorage.screenshootQuality =
+  chrome.storage.local.set({
+    'screenshootQuality': 
       $('lossy').checked ? 'jpeg' : '' ||
-      $('lossless').checked ? 'png' : '';
+      $('lossless').checked ? 'png' : '',
+  });
 
   return true;
 }
@@ -43,8 +45,10 @@
 }
 
 function initScreenCaptureQuality() {
-  $('lossy').checked = localStorage.screenshootQuality == 'jpeg';
-  $('lossless').checked = localStorage.screenshootQuality == 'png';
+  chrome.storage.local.get('screenshotQuality', value => {
+    $('lossy').checked = value == 'jpeg';
+    $('lossless').checked = value == 'png';
+  });
 }
 
 function i18nReplace(id, name) {
diff --git a/src/js/page.js b/src/js/page.js
index 9ca2463..5fe494d 100644
--- a/src/js/page.js
+++ b/src/js/page.js
@@ -847,10 +847,11 @@
   /**
   * Remove an element
   */
-  init: function() { 
+  init: function() {
     if (document.body.hasAttribute('screen_capture_injected')) {
       return;
     }
+    document.body.setAttribute('screen_capture_injected', true);
     if (isPageCapturable()) {
       chrome.extension.sendMessage({msg: 'page_capturable'});
     } else {
diff --git a/src/js/popup.js b/src/js/popup.js
index 2319055..5eeb471 100644
--- a/src/js/popup.js
+++ b/src/js/popup.js
@@ -72,80 +72,98 @@
   document.body.style.minWidth = "140px";
 
   var isScriptLoad = false;
-  chrome.tabs.getSelected(null, function(tab) {
+  chrome.tabs.query({
+    active: true,
+  }, function(tabs) {
+    if (tabs.length < 1) {
+      console.error('Expected 1 tab');
+      return;
+    }
+    var tab = tabs[0];
     if (tab.url.indexOf('chrome') == 0 || tab.url.indexOf('about') == 0) {
       i18nReplace('tip', 'special');
       return;
-    } else {
-      $('tip').style.display = 'none';
-      $('captureSpecialPageItem').style.display = 'block';
-      showOption();
     }
-    chrome.tabs.sendMessage(tab.id, {msg: 'is_page_capturable'},
-      function(response) {
-        isScriptLoad = true;
-        if (response.msg == 'capturable') {
-          $('tip').style.display = 'none';
-          $('captureSpecialPageItem').style.display = 'none';
-          $('captureWindowItem').style.display = 'block';
-          $('captureAreaItem').style.display = 'block';
-          $('captureWebpageItem').style.display = 'block';
-          var textWidth = $('captureWindowText')['scrollWidth'];
-          resizeDivWidth('captureWindowText', textWidth);
-          resizeDivWidth('captureAreaText', textWidth);
-          resizeDivWidth('captureWebpageText', textWidth);
-          var bg = chrome.extension.getBackgroundPage();
-          if (bg.screenshot.isThisPlatform('mac')) {
-            $('captureAreaShortcut').innerText = '\u2325\u2318R';
-            $('captureWindowShortcut').innerText = '\u2325\u2318V';
-            $('captureWebpageShortcut').innerText = '\u2325\u2318H';
-          }
-        } else if (response.msg == 'uncapturable') {
-          i18nReplace('tip', 'special');
-          $('tip').style.display = 'block';
-        } else {
-          i18nReplace('tip', 'loading');
-        }
-      });
-  });
-  chrome.tabs.executeScript(null, {file: 'js/isLoad.js'});
-  var insertScript = function() {
-    if (isScriptLoad == false) {
-      chrome.tabs.getSelected(null, function(tab) {
-        if (tab.url.indexOf('chrome') == 0 ||
-            tab.url.indexOf('about') == 0) {
-          i18nReplace('tip', 'special');
-        } else {
-          $('tip').style.display = 'none';
-          $('captureSpecialPageItem').style.display = 'block';
-          showOption();
-        }
-      });
-    }
-    var captureItems = document.querySelectorAll('li.menuI');
-    var showSeparator = false;
-    for (var i = 0; i < captureItems.length; i++) {
-      if (window.getComputedStyle(captureItems[i]).display != 'none') {
-        showSeparator = true;
-        break;
-      }
-    }
-    $('separatorItem').style.display = showSeparator ? 'block' : 'none';
-  }
-  setTimeout(insertScript, 500);
+    chrome.tabs.executeScript({ file: 'js/page.js' }, _ => {
+      chrome.tabs.executeScript(null, {file: 'js/isLoad.js'}, _ => {
+        $('tip').style.display = 'none';
+        $('captureSpecialPageItem').style.display = 'block';
+        showOption();
 
-  // Update hot key.
-  $('captureSpecialPageItem').addEventListener('click', function(e) {
-    toDo('capture_special_page');
-  });
-  $('captureAreaItem').addEventListener('click', function(e) {
-    toDo('capture_area');
-  });
-  $('captureWindowItem').addEventListener('click', function(e) {
-    toDo('capture_window');
-  });
-  $('captureWebpageItem').addEventListener('click', function(e) {
-    toDo('capture_webpage');
+        chrome.tabs.sendMessage(tab.id, {msg: 'is_page_capturable'},
+          response => {
+            isScriptLoad = true;
+            if (response.msg == 'capturable') {
+              $('tip').style.display = 'none';
+              $('captureSpecialPageItem').style.display = 'none';
+              $('captureWindowItem').style.display = 'block';
+              $('captureAreaItem').style.display = 'block';
+              $('captureWebpageItem').style.display = 'block';
+              var textWidth = $('captureWindowText')['scrollWidth'];
+              resizeDivWidth('captureWindowText', textWidth);
+              resizeDivWidth('captureAreaText', textWidth);
+              resizeDivWidth('captureWebpageText', textWidth);
+              var bg = chrome.extension.getBackgroundPage();
+              if (bg.screenshot.isThisPlatform('mac')) {
+                $('captureAreaShortcut').innerText = '\u2325\u2318R';
+                $('captureWindowShortcut').innerText = '\u2325\u2318V';
+                $('captureWebpageShortcut').innerText = '\u2325\u2318H';
+              }
+            } else if (response.msg == 'uncapturable') {
+              i18nReplace('tip', 'special');
+              $('tip').style.display = 'block';
+            } else {
+              i18nReplace('tip', 'loading');
+            }
+          });
+
+          var insertScript = function() {
+            if (isScriptLoad == false) {
+              chrome.tabs.query({
+                active: true,
+              }, function(tabs) {
+                if (tabs.length < 1) {
+                  console.error('Expected 1 tab.');
+                  return;
+                }
+                var tab = tabs[0];
+                if (tab.url.indexOf('chrome') == 0 ||
+                    tab.url.indexOf('about') == 0) {
+                  i18nReplace('tip', 'special');
+                } else {
+                  $('tip').style.display = 'none';
+                  $('captureSpecialPageItem').style.display = 'block';
+                  showOption();
+                }
+              });
+            }
+            var captureItems = document.querySelectorAll('li.menuI');
+            var showSeparator = false;
+            for (var i = 0; i < captureItems.length; i++) {
+              if (window.getComputedStyle(captureItems[i]).display != 'none') {
+                showSeparator = true;
+                break;
+              }
+            }
+            $('separatorItem').style.display = showSeparator ? 'block' : 'none';
+          }
+          setTimeout(insertScript, 500);
+
+          // Update hot key.
+          $('captureSpecialPageItem').addEventListener('click', function(e) {
+            toDo('capture_special_page');
+          });
+          $('captureAreaItem').addEventListener('click', function(e) {
+            toDo('capture_area');
+          });
+          $('captureWindowItem').addEventListener('click', function(e) {
+            toDo('capture_window');
+          });
+          $('captureWebpageItem').addEventListener('click', function(e) {
+            toDo('capture_webpage');
+          });
+      });
+    });
   });
 }
 
diff --git a/src/js/showimage.js b/src/js/showimage.js
index b0d5f03..6e6d8ad 100644
--- a/src/js/showimage.js
+++ b/src/js/showimage.js
@@ -504,13 +504,15 @@
 
   save: function() {
     photoshop.draw();
-    var formatParam  = localStorage.screenshootQuality || 'png';
-    var dataUrl;
-    var isJpeg = formatParam == 'jpeg';
-    $('canvas').toBlob(function(blob) {
-      saveAs(blob, chrome.extension.getBackgroundPage().screenshot.screenshotName+".png");
-    }, 'image/' + (isJpeg ? 'jpeg' : 'png'), (isJpeg ? 0.5 : null));
-    photoshop.finish();
+    chrome.storage.local.get('screenshotQuality', formatParam => {
+      var formatParam = formatParam || 'png';
+      var dataUrl;
+      var isJpeg = formatParam == 'jpeg';
+      $('canvas').toBlob(function(blob) {
+        saveAs(blob, chrome.extension.getBackgroundPage().screenshot.screenshotName+".png");
+      }, 'image/' + (isJpeg ? 'jpeg' : 'png'), (isJpeg ? 0.5 : null));
+      photoshop.finish();
+    });
   },
 
   drawLineOnMaskCanvas: function(startX, startY, endX, endY, type, layerId) {
