Code cleaning

This commit is contained in:
varjolintu 2017-12-18 14:12:47 +02:00
parent 41f53cc10c
commit 6fdaaaba56
3 changed files with 4 additions and 3 deletions

View file

@ -105,7 +105,7 @@ page.removePageInformationFromNotExistingTabs = function() {
let rand = Math.floor(Math.random()*1001);
if (rand === 28) {
browser.tabs.query({}).then(function(tabs) {
let $tabIds = {};
let $tabIds = [];
const $infoIds = Object.keys(page.tabs);
for (const t of tabs) {

View file

@ -138,7 +138,7 @@
<br />
<br />
<div>
Your running version of KeePassXC: <em class="yourVersion"></em>
You are running version of KeePassXC: <em class="yourVersion"></em>
</div>
<div>
Latest available version of KeePassXC: <em class="latestVersion"></em>

View file

@ -66,8 +66,9 @@ $(function() {
$('#redetect-fields-button').click(function() {
browser.tabs.query({"active": true, "currentWindow": true}).then(function(tabs) {
if (tabs.length === 0)
if (tabs.length === 0) {
return; // For example: only the background devtools or a popup are opened
}
let tab = tabs[0];
browser.tabs.sendMessage(tab.id, {