Microsoft has acquired GitHub. Decentraleyes has left GitHub. Welcome to its new home!

To participate, please register, or sign in with an existing GitLab.com, Bitbucket, or GitHub account.

Past contributions on GitHub? Be sure to reclaim your Comments, Issues, and Pull Requests.

Refactor existing codebase

parent 48a66145
......@@ -27,6 +27,8 @@ const Address = {
'EXAMPLE': 'example.org',
'HTTP': 'http:',
'HTTPS': 'https:',
'RESOURCE_PATH': '/resources',
'ROOT_PATH': '/',
'WWW_PREFIX': 'www.'
};
......
......@@ -39,7 +39,7 @@ fileGuard._startListening = function () {
fileGuard._verifyRequest = function (requestDetails) {
let redirectUrl = chrome.runtime.getURL('/');
let redirectUrl = chrome.runtime.getURL(Address.ROOT_PATH);
if (!requestDetails.url.endsWith(fileGuard.secret)) {
return {redirectUrl};
......@@ -50,7 +50,7 @@ fileGuard._verifyRequest = function (requestDetails) {
* Initializations
*/
fileGuard.path = chrome.runtime.getURL('/resources');
fileGuard.path = chrome.runtime.getURL(Address.RESOURCE_PATH);
fileGuard.secret = '';
if (fileGuard.path.startsWith(Address.CHROME_EXTENSION)) {
......
......@@ -123,7 +123,7 @@ stateManager._removeTab = function (tabIdentifier) {
stateManager._updateTab = function (details) {
let tabDomain, domainIsWhitelisted, tabIdentifier, frameIdentifier;
let tabDomain, domainIsWhitelisted, frameIdentifier, tabIdentifier;
tabDomain = helpers.extractDomainFromUrl(details.url);
domainIsWhitelisted = stateManager._domainIsWhitelisted(tabDomain);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment