Various improvements in the code
This commit is contained in:
parent
9142b5b258
commit
f283cae79a
|
@ -179,7 +179,7 @@ stateManager._createTab = function (tab) {
|
||||||
|
|
||||||
chrome.webRequest.onBeforeRequest.addListener(function (requestDetails) {
|
chrome.webRequest.onBeforeRequest.addListener(function (requestDetails) {
|
||||||
|
|
||||||
let tab = stateManager.tabs[tabIdentifier].details || {};
|
tab = stateManager.tabs[tabIdentifier].details || {};
|
||||||
return interceptor.handleRequest(requestDetails, tabIdentifier, tab);
|
return interceptor.handleRequest(requestDetails, tabIdentifier, tab);
|
||||||
|
|
||||||
}, requestFilters, [WebRequest.BLOCKING]);
|
}, requestFilters, [WebRequest.BLOCKING]);
|
||||||
|
|
|
@ -29,7 +29,7 @@ var helpers = {};
|
||||||
|
|
||||||
helpers.insertI18nContentIntoDocument = function (document) {
|
helpers.insertI18nContentIntoDocument = function (document) {
|
||||||
|
|
||||||
let scriptDirection, defaultScriptDirection, i18nElements, translationComplete;
|
let scriptDirection, i18nElements, translationComplete;
|
||||||
|
|
||||||
translationComplete = true;
|
translationComplete = true;
|
||||||
scriptDirection = helpers.determineScriptDirection(navigator.language);
|
scriptDirection = helpers.determineScriptDirection(navigator.language);
|
||||||
|
|
|
@ -217,11 +217,9 @@ options._onOptionChanged = function ({target}) {
|
||||||
optionKey = target.getAttribute('data-option');
|
optionKey = target.getAttribute('data-option');
|
||||||
optionType = target.getAttribute('type');
|
optionType = target.getAttribute('type');
|
||||||
|
|
||||||
switch (optionType) {
|
if (optionType === 'checkbox') {
|
||||||
case 'checkbox':
|
|
||||||
optionValue = target.checked;
|
optionValue = target.checked;
|
||||||
break;
|
} else {
|
||||||
default:
|
|
||||||
optionValue = target.value;
|
optionValue = target.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ popup._renderContents = function () {
|
||||||
|
|
||||||
popup._renderNonContextualContents = function () {
|
popup._renderNonContextualContents = function () {
|
||||||
|
|
||||||
let versionLabelElement, nameLabelElement, counterElement, testingUtilityLinkElement, optionsButtonElement, donationButtonElement, infoButtonLabel, infoButtonSVG;
|
let versionLabelElement, nameLabelElement, counterElement, testingUtilityLinkElement, optionsButtonElement, donationButtonElement, infoButtonLabel;
|
||||||
|
|
||||||
versionLabelElement = document.getElementById('version-label');
|
versionLabelElement = document.getElementById('version-label');
|
||||||
nameLabelElement = document.getElementById('name-label');
|
nameLabelElement = document.getElementById('name-label');
|
||||||
|
|
Loading…
Reference in New Issue