style: format code with Prettier and remove unused code

Change-Id: I382f39d142cfa29f192447b0d2c6d48e113327b4
diff --git a/_locales/ca/messages.json b/_locales/ca/messages.json
index 7f9634c..1e23473 100644
--- a/_locales/ca/messages.json
+++ b/_locales/ca/messages.json
@@ -1,26 +1,26 @@
 {
-	"appName": {
-		"message": "Denunciar pàgines web",
-		"description": "The app name"
-	},
-	"appDescription" : {
-		"message": "Tradueix el text que seleccionis amb el Traductor de Google",
-		"description": "The app description"
-	},
-	"report_badware": {
-		"message": "Denunciar software maligne",
-		"description": "Button in the popup"
-	},
-	"report_webspam": {
-		"message": "Denunciar webspam",
-		"description": "Button in the popup"
-	},
-	"report_phishing": {
-		"message": "Denunciar suplantació d'identitat",
-		"description": "Button in the popup"
-	},
-	"options_closebutton": {
-		"message": "Tancar",
-		"description": "Close button in the settings app"
-	}
+  "appName": {
+    "message": "Denunciar pàgines web",
+    "description": "The app name"
+  },
+  "appDescription": {
+    "message": "Tradueix el text que seleccionis amb el Traductor de Google",
+    "description": "The app description"
+  },
+  "report_badware": {
+    "message": "Denunciar software maligne",
+    "description": "Button in the popup"
+  },
+  "report_webspam": {
+    "message": "Denunciar webspam",
+    "description": "Button in the popup"
+  },
+  "report_phishing": {
+    "message": "Denunciar suplantació d'identitat",
+    "description": "Button in the popup"
+  },
+  "options_closebutton": {
+    "message": "Tancar",
+    "description": "Close button in the settings app"
+  }
 }
diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index 4bc65c1..1d20459 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -1,26 +1,26 @@
 {
-	"appName": {
-		"message": "Report Webpages",
-		"description": "The app name"
-	},
-	"appDescription": {
-	"message": "Quickly report webpages clicking in the extension icon in the Omnibox",
-		"description": "The app description"
-	},
-	"report_badware": {
-		"message": "Report badware",
-		"description": "Button in the popup"
-	},
-	"report_webspam": {
-		"message": "Report webspam",
-		"description": "Button in the popup"
-	},
-	"report_phishing": {
-		"message": "Report phishing",
-		"description": "Button in the popup"
-	},
-	"options_closebutton": {
-		"message": "Close",
-		"description": "Close button in the settings page"
-	}
+  "appName": {
+    "message": "Report Webpages",
+    "description": "The app name"
+  },
+  "appDescription": {
+    "message": "Quickly report webpages clicking in the extension icon in the Omnibox",
+    "description": "The app description"
+  },
+  "report_badware": {
+    "message": "Report badware",
+    "description": "Button in the popup"
+  },
+  "report_webspam": {
+    "message": "Report webspam",
+    "description": "Button in the popup"
+  },
+  "report_phishing": {
+    "message": "Report phishing",
+    "description": "Button in the popup"
+  },
+  "options_closebutton": {
+    "message": "Close",
+    "description": "Close button in the settings page"
+  }
 }
diff --git a/_locales/es/messages.json b/_locales/es/messages.json
index eceea2c..7f316df 100644
--- a/_locales/es/messages.json
+++ b/_locales/es/messages.json
@@ -1,26 +1,26 @@
 {
-	"appName": {
-		"message": "Denunciar páginas web",
-		"description": "The app name"
-	},
-	"appDescription" : {
-		"message": "Traduce el texto que selecciones con el Traductor de Google.",
-		"description": "The app description"
-	},
-	"report_badware": {
-		"message": "Denunciar software maligno",
-		"description": "Button in the popup"
-	},
-	"report_webspam": {
-		"message": "Denunciar webspam",
-		"description": "Button in the popup"
-	},
-	"report_phishing": {
-		"message": "Denunciar suplantacion de identidad",
-		"description": "Button in the popup"
-	},
-	"options_closebutton": {
-		"message": "Cerrar",
-		"description": "Close button in the settings app"
-	}
+  "appName": {
+    "message": "Denunciar páginas web",
+    "description": "The app name"
+  },
+  "appDescription": {
+    "message": "Traduce el texto que selecciones con el Traductor de Google.",
+    "description": "The app description"
+  },
+  "report_badware": {
+    "message": "Denunciar software maligno",
+    "description": "Button in the popup"
+  },
+  "report_webspam": {
+    "message": "Denunciar webspam",
+    "description": "Button in the popup"
+  },
+  "report_phishing": {
+    "message": "Denunciar suplantacion de identidad",
+    "description": "Button in the popup"
+  },
+  "options_closebutton": {
+    "message": "Cerrar",
+    "description": "Close button in the settings app"
+  }
 }
diff --git a/options.css b/options.css
index ee8f611..89d01d3 100644
--- a/options.css
+++ b/options.css
@@ -1,18 +1,18 @@
 body {
-	padding:10px;
-	font-family:"Roboto", "Arial", sans-serif!important;
+  padding: 10px;
+  font-family: "Roboto", "Arial", sans-serif !important;
 }
 h1 {
-	text-align:center;
-	font-size:30px;
+  text-align: center;
+  font-size: 30px;
 }
 h2 {
-	font-size:20px;
+  font-size: 20px;
 }
 #languages {
-	-webkit-column-count:4;
+  -webkit-column-count: 4;
 }
 button#close {
-	display:block;
-	margin:18px auto;
-}
\ No newline at end of file
+  display: block;
+  margin: 18px auto;
+}
diff --git a/options.html b/options.html
index e24bd74..81ef68a 100644
--- a/options.html
+++ b/options.html
@@ -1,14 +1,18 @@
 <html>
-	<head>
-		<title>Options</title>
-		<meta charset="UTF-8">
-		<script src="options.js"></script>
-		<link rel="stylesheet" type="text/css" href="options.css">
-		<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
-	</head>
-	<body>
-		<h1 id="extension_name"></h1>
-		<p id="no_options"></p>
-		<button id="close"></button>
-	</body>
+  <head>
+    <title>Options</title>
+    <meta charset="UTF-8" />
+    <script src="options.js"></script>
+    <link rel="stylesheet" type="text/css" href="options.css" />
+    <link
+      href="http://fonts.googleapis.com/css?family=Roboto"
+      rel="stylesheet"
+      type="text/css"
+    />
+  </head>
+  <body>
+    <h1 id="extension_name"></h1>
+    <p id="no_options"></p>
+    <button id="close"></button>
+  </body>
 </html>
diff --git a/options.js b/options.js
index 5656380..67cc03a 100644
--- a/options.js
+++ b/options.js
@@ -1,13 +1,13 @@
-var isoLangs = {"af":{"name":"Afrikaans","nativeName":"Afrikaans"},"sq":{"name":"Albanian","nativeName":"Shqip"},"ar":{"name":"Arabic","nativeName":"\u0639\u0631\u0628\u064a"},"hy":{"name":"Armenian","nativeName":"\u0540\u0561\u0575\u0565\u0580\u0567\u0576"},"az":{"name":"Azerbaijani","nativeName":"\u0622\u0630\u0631\u0628\u0627\u06cc\u062c\u0627\u0646 \u062f\u06cc\u0644\u06cc"},"eu":{"name":"Basque","nativeName":"Euskara"},"be":{"name":"Belarusian","nativeName":"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f"},"bg":{"name":"Bulgarian","nativeName":"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438"},"ca":{"name":"Catalan","nativeName":"Catal\u00e0"},"zh-CN":{"name":"Chinese (Simplified)","nativeName":"\u4e2d\u6587\u7b80\u4f53"},"zh-TW":{"name":"Chinese (Traditional)","nativeName":"\u4e2d\u6587\u7e41\u9ad4"},"hr":{"name":"Croatian","nativeName":"Hrvatski"},"cs":{"name":"Czech","nativeName":"\u010ce\u0161tina"},"da":{"name":"Danish","nativeName":"Dansk"},"nl":{"name":"Dutch","nativeName":"Nederlands"},"en":{"name":"English","nativeName":"English"},"et":{"name":"Estonian","nativeName":"Eesti keel"},"tl":{"name":"Filipino","nativeName":"Filipino"},"fi":{"name":"Finnish","nativeName":"Suomi"},"fr":{"name":"French","nativeName":"Fran\u00e7ais"},"gl":{"name":"Galician","nativeName":"Galego"},"ka":{"name":"Georgian","nativeName":"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8"},"de":{"name":"German","nativeName":"Deutsch"},"el":{"name":"Greek","nativeName":"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac"},"ht":{"name":"Haitian Creole","nativeName":"Krey\u00f2l ayisyen"},"iw":{"name":"Hebrew","nativeName":"\u05e2\u05d1\u05e8\u05d9\u05ea"},"hi":{"name":"Hindi","nativeName":"\u0939\u093f\u0928\u094d\u0926\u0940"},"hu":{"name":"Hungarian","nativeName":"Magyar"},"is":{"name":"Icelandic","nativeName":"\u00cdslenska"},"id":{"name":"Indonesian","nativeName":"Bahasa Indonesia"},"ga":{"name":"Irish","nativeName":"Gaeilge"},"it":{"name":"Italian","nativeName":"Italiano"},"ja":{"name":"Japanese","nativeName":"\u65e5\u672c\u8a9e"},"ko":{"name":"Korean","nativeName":"\ud55c\uad6d\uc5b4"},"lv":{"name":"Latvian","nativeName":"Latvie\u0161u"},"lt":{"name":"Lithuanian","nativeName":"Lietuvi\u0173 kalba"},"mk":{"name":"Macedonian","nativeName":"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438"},"ms":{"name":"Malay","nativeName":"Malay"},"mt":{"name":"Maltese","nativeName":"Malti"},"no":{"name":"Norwegian","nativeName":"Norsk"},"fa":{"name":"Persian","nativeName":"\u0641\u0627\u0631\u0633\u06cc"},"pl":{"name":"Polish","nativeName":"Polski"},"pt":{"name":"Portuguese","nativeName":"Portugu\u00eas"},"ro":{"name":"Romanian","nativeName":"Rom\u00e2n\u0103"},"ru":{"name":"Russian","nativeName":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439"},"sr":{"name":"Serbian","nativeName":"\u0421\u0440\u043f\u0441\u043a\u0438"},"sk":{"name":"Slovak","nativeName":"Sloven\u010dina"},"sl":{"name":"Slovenian","nativeName":"Slovensko"},"es":{"name":"Spanish","nativeName":"Espa\u00f1ol"},"sw":{"name":"Swahili","nativeName":"Kiswahili"},"sv":{"name":"Swedish","nativeName":"Svenska"},"th":{"name":"Thai","nativeName":"\u0e44\u0e17\u0e22"},"tr":{"name":"Turkish","nativeName":"T\u00fcrk\u00e7e"},"uk":{"name":"Ukrainian","nativeName":"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430"},"ur":{"name":"Urdu","nativeName":"\u0627\u0631\u062f\u0648"},"vi":{"name":"Vietnamese","nativeName":"Ti\u1ebfng Vi\u1ec7t"},"cy":{"name":"Welsh","nativeName":"Cymraeg"},"yi":{"name":"Yiddish","nativeName":"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9"}};
-
 function $(selector) {
-    return document.querySelector(selector);
+  return document.querySelector(selector);
 }
 
 function init() {
-    $("#extension_name").innerHTML = chrome.i18n.getMessage("appName");
-    $("#close").innerHTML = chrome.i18n.getMessage("options_closebutton");
-    $("#close").addEventListener('click', function() { window.close(); });
+  $("#extension_name").innerHTML = chrome.i18n.getMessage("appName");
+  $("#close").innerHTML = chrome.i18n.getMessage("options_closebutton");
+  $("#close").addEventListener("click", function () {
+    window.close();
+  });
 }
 
-window.addEventListener('load', init);
+window.addEventListener("load", init);
diff --git a/pageevent.js b/pageevent.js
index ad7ac40..587862c 100644
--- a/pageevent.js
+++ b/pageevent.js
@@ -1,14 +1,14 @@
-chrome.runtime.onInstalled.addListener(function() {
-  chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
-     chrome.declarativeContent.onPageChanged.addRules([
-       {
-         conditions: [
-           new chrome.declarativeContent.PageStateMatcher({
-             pageUrl: { schemes: ['http', 'https'] },
-           })
-         ],
-        actions: [ new chrome.declarativeContent.ShowPageAction() ]
-      }
+chrome.runtime.onInstalled.addListener(function () {
+  chrome.declarativeContent.onPageChanged.removeRules(undefined, function () {
+    chrome.declarativeContent.onPageChanged.addRules([
+      {
+        conditions: [
+          new chrome.declarativeContent.PageStateMatcher({
+            pageUrl: { schemes: ["http", "https"] },
+          }),
+        ],
+        actions: [new chrome.declarativeContent.ShowPageAction()],
+      },
     ]);
   });
 });
diff --git a/popup.css b/popup.css
index 620d6a8..bd8c062 100644
--- a/popup.css
+++ b/popup.css
@@ -9,17 +9,17 @@
   width: 150px;
 }
 div#options div.option {
-  text-align:center;
-  padding:8px;
-  background-color:#EEEEEE;
+  text-align: center;
+  padding: 8px;
+  background-color: #eeeeee;
   border-bottom: solid 1px gray;
   cursor: pointer;
 }
 div#options div.option:hover {
-  background-color:#DDDDDD;
+  background-color: #dddddd;
 }
 div#options div.option:active {
-  background-color:#CCCCCC;
+  background-color: #cccccc;
 }
 div#options div.option:last-child {
   border-bottom: none;
diff --git a/popup.html b/popup.html
index 51b6f97..b1eca61 100644
--- a/popup.html
+++ b/popup.html
@@ -1,9 +1,9 @@
-<!DOCTYPE html>
+<!doctype html>
 <html>
   <head>
-    <meta charset="UTF-8">
+    <meta charset="UTF-8" />
     <title>Report Webpages</title>
-    <link rel="stylesheet" type="text/css" href="popup.css">
+    <link rel="stylesheet" type="text/css" href="popup.css" />
   </head>
   <body>
     <div id="options">
diff --git a/popup.js b/popup.js
index 39d2579..58f9839 100644
--- a/popup.js
+++ b/popup.js
@@ -1,19 +1,26 @@
-var websites = {"badware": "http://www.google.com/safebrowsing/report_badware/?url=", "webspam": "https://www.google.com/webmasters/tools/spamreportform?spamurl=", "phishing": "http://www.google.com/safebrowsing/report_phish/?url="};
+var websites = {
+  badware: "http://www.google.com/safebrowsing/report_badware/?url=",
+  webspam: "https://www.google.com/webmasters/tools/spamreportform?spamurl=",
+  phishing: "http://www.google.com/safebrowsing/report_phish/?url=",
+};
 
 var options = document.querySelectorAll("div#options div.option");
 
 for (var i = 0; i < options.length; i++) {
-  options[i].innerText = chrome.i18n.getMessage("report_"+options[i].id);
-  options[i].onclick = function(a) {
+  options[i].innerText = chrome.i18n.getMessage("report_" + options[i].id);
+  options[i].onclick = function (a) {
     var id = this.id;
-    chrome.tabs.query({
-      lastFocusedWindow: true,
-      active: true
-    }, function(tab){
-      chrome.tabs.create({
-        url: websites[id]+encodeURI(tab[0].url),
-        index: tab[0].index + 1
-      });
-    });
-  }
+    chrome.tabs.query(
+      {
+        lastFocusedWindow: true,
+        active: true,
+      },
+      function (tab) {
+        chrome.tabs.create({
+          url: websites[id] + encodeURI(tab[0].url),
+          index: tab[0].index + 1,
+        });
+      },
+    );
+  };
 }