Skip to content

Commit

Permalink
Use single quotes instead of double quotes in code
Browse files Browse the repository at this point in the history
  • Loading branch information
HostedDinner committed Jun 10, 2018
1 parent 45d1a4b commit 7d7318e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const browser = window.browser || window.chrome;
const debugLog = false;

const requestFilter = {
urls: ["<all_urls>"]
urls: ['<all_urls>']
};

const IPVERSIONS = {
Expand Down Expand Up @@ -73,7 +73,7 @@ function queryActiveTabId(){
if(tabs.length === 1){
resolve(tabs[0].id);
}else{
reject("Found " + tabs.length + " Tabs, instead of 1");
reject('Found ' + tabs.length + ' Tabs, instead of 1');
}
});
});
Expand Down Expand Up @@ -158,7 +158,7 @@ function getOrCreateTabStorage(tabId){
*/
if(debugLog){
browser.webRequest.onBeforeRequest.addListener((details) => {
console.log('[' + details.tabId + '] ' + details.requestId + ": Request started " + details.url);
console.log('[' + details.tabId + '] ' + details.requestId + ': Request started ' + details.url);
}, requestFilter);
}

Expand Down Expand Up @@ -220,7 +220,7 @@ browser.webRequest.onResponseStarted.addListener((details) => {
/*
* Called, when a (new) tab gets activated
* keep showing the icon on every tab and not only on tabs wich have done at least one request
* in the case of a new tab the "?" is shown
* in the case of a new tab the '?' is shown
*/
browser.tabs.onActivated.addListener((activeInfo) => {
updatePageAction(activeInfo.tabId);
Expand Down Expand Up @@ -273,7 +273,7 @@ browser.runtime.onConnect.addListener((port) => {
popupConnectionPort.onMessage.addListener((message) => {

// dispatch message
// for example when getting somthing like message.action = "getXXX" or "requestContent"
// for example when getting somthing like message.action = 'getXXX' or 'requestContent'

let action = message.action;
if(action !== undefined){
Expand Down
14 changes: 7 additions & 7 deletions src/popup/information.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function buildRow(row, counterIpInfo){
* @returns {HTMLElement}
*/
function getIpVersionImg(ipVersion){
let newImageHTMLElement = document.createElement("img");
let newImageHTMLElement = document.createElement('img');
let pathSVG = [ICONDIR, ipVersion, '.svg'].join('');

newImageHTMLElement.src = pathSVG;
Expand All @@ -76,9 +76,9 @@ function getIpVersionImg(ipVersion){
function getIpVersionHelpText(ipVersion){
let helpText = 'Unknown';
switch(ipVersion){
case 'v4': helpText = browser.i18n.getMessage("popupTooltipLoadedIpVersion", "IPv4"); break;
case 'v6': helpText = browser.i18n.getMessage("popupTooltipLoadedIpVersion", "IPv6"); break;
case 'cache': helpText = browser.i18n.getMessage("popupTooltipLoadedCache"); break;
case 'v4': helpText = browser.i18n.getMessage('popupTooltipLoadedIpVersion', 'IPv4'); break;
case 'v6': helpText = browser.i18n.getMessage('popupTooltipLoadedIpVersion', 'IPv6'); break;
case 'cache': helpText = browser.i18n.getMessage('popupTooltipLoadedCache'); break;
}
return helpText;
}
Expand All @@ -90,15 +90,15 @@ function getIpVersionHelpText(ipVersion){
* @returns {HTMLElement}
*/
function getHostNameSpan(counterIpInfo){
let newSpanHTMLElement = document.createElement("span");
let newSpanHTMLElement = document.createElement('span');

newSpanHTMLElement.innerHTML = counterIpInfo.hostname;
if(counterIpInfo.isMain)
newSpanHTMLElement.classList.add('mainItem');

if(counterIpInfo.isProxied){
newSpanHTMLElement.classList.add('proxyItem');
newSpanHTMLElement.title = browser.i18n.getMessage("popupTooltipLoadedProxy");
newSpanHTMLElement.title = browser.i18n.getMessage('popupTooltipLoadedProxy');
}

return newSpanHTMLElement;
Expand Down Expand Up @@ -128,7 +128,7 @@ function setDefaultText(){
document.getElementById('note').innerHTML = browser.i18n.getMessage('popupDefaultText');
}

document.addEventListener("DOMContentLoaded", () =>
document.addEventListener('DOMContentLoaded', () =>
{
setDefaultText();

Expand Down

0 comments on commit 7d7318e

Please sign in to comment.