Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Synzvato/decentraleyes
  • gkrishnaks/decentraleyes
  • ExE-Boss/decentraleyes
  • whtsky/decentraleyes
  • grtgarrett/decentraleyes
  • An_dz/decentraleyes
  • Alaska/decentraleyes
  • finn/decentraleyes
  • klippy/decentraleyes
9 results
Show changes
Showing
with 1172 additions and 11 deletions
/**
* Main Options Page
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2016-08-09
* @license MPL 2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
/**
* Options
*/
var options = {};
/**
* Private Methods
*/
options._renderContents = function () {
document.body.setAttribute('dir', options._scriptDirection);
helpers.insertI18nContentIntoDocument(document);
options._determineOptionValues()
.then(options._renderOptionsPanel);
};
options._renderOptionsPanel = function () {
let whitelistedDomains, domainWhitelist, elements;
whitelistedDomains = options._optionValues.whitelistedDomains;
domainWhitelist = options._serializeWhitelistedDomains(whitelistedDomains);
elements = options._optionElements;
elements.showIconBadge.checked = options._optionValues.showIconBadge;
elements.blockMissing.checked = options._optionValues.blockMissing;
elements.disablePrefetch.checked = options._optionValues.disablePrefetch;
elements.stripMetadata.checked = options._optionValues.stripMetadata;
elements.whitelistedDomains.value = domainWhitelist;
options._registerOptionChangedEventListeners(elements);
if (options._languageSupported === false) {
options._renderLocaleNotice();
}
};
options._renderLocaleNotice = function () {
let localeNoticeElement = document.getElementById('notice-locale');
localeNoticeElement.setAttribute('class', 'notice');
};
options._registerOptionChangedEventListeners = function (elements) {
elements.showIconBadge.addEventListener('change', options._onOptionChanged);
elements.blockMissing.addEventListener('change', options._onOptionChanged);
elements.disablePrefetch.addEventListener('change', options._onOptionChanged);
elements.stripMetadata.addEventListener('change', options._onOptionChanged);
elements.whitelistedDomains.addEventListener('keyup', options._onOptionChanged);
};
options._determineOptionValues = function () {
return new Promise((resolve) => {
let optionKeys = Object.keys(options._optionElements);
chrome.storage.local.get(optionKeys, function (items) {
options._optionValues = items;
resolve();
});
});
};
options._getOptionElement = function (optionKey) {
return document.querySelector(`[data-option=${optionKey}]`);
};
options._getOptionElements = function () {
let optionElements = {
[Setting.SHOW_ICON_BADGE]: options._getOptionElement(Setting.SHOW_ICON_BADGE),
[Setting.BLOCK_MISSING]: options._getOptionElement(Setting.BLOCK_MISSING),
[Setting.DISABLE_PREFETCH]: options._getOptionElement(Setting.DISABLE_PREFETCH),
[Setting.STRIP_METADATA]: options._getOptionElement(Setting.STRIP_METADATA),
[Setting.WHITELISTED_DOMAINS]: options._getOptionElement(Setting.WHITELISTED_DOMAINS)
};
return optionElements;
};
options._configureLinkPrefetching = function (value) {
if (value === false) {
// Restore default values of related preference values.
chrome.privacy.network.networkPredictionEnabled.clear({});
} else {
chrome.privacy.network.networkPredictionEnabled.set({
'value': false
});
}
};
options._serializeWhitelistedDomains = function (whitelistedDomains) {
let domainWhitelist, whitelistedDomainKeys;
whitelistedDomainKeys = Object.keys(whitelistedDomains);
domainWhitelist = '';
whitelistedDomainKeys.forEach(function (domain) {
domainWhitelist = `${domainWhitelist}${domain};`;
});
domainWhitelist = domainWhitelist.slice(0, -1);
domainWhitelist = domainWhitelist.replace(Whitelist.TRIM_EXPRESSION, '');
return domainWhitelist;
};
options._parseDomainWhitelist = function (domainWhitelist) {
let whitelistedDomains = {};
domainWhitelist.split(Whitelist.VALUE_SEPARATOR).forEach(function (domain) {
whitelistedDomains[helpers.normalizeDomain(domain)] = true;
});
return whitelistedDomains;
};
/**
* Event Handlers
*/
options._onDocumentLoaded = function () {
let language = navigator.language;
options._optionElements = options._getOptionElements();
options._languageSupported = helpers.languageIsFullySupported(language);
options._scriptDirection = helpers.determineScriptDirection(language);
options._renderContents();
};
options._onOptionChanged = function ({target}) {
let optionKey, optionType, optionValue;
optionKey = target.getAttribute('data-option');
optionType = target.getAttribute('type');
switch (optionType) {
case 'checkbox':
optionValue = target.checked;
break;
default:
optionValue = target.value;
}
if (optionKey === Setting.DISABLE_PREFETCH) {
options._configureLinkPrefetching(optionValue);
}
if (optionKey === Setting.WHITELISTED_DOMAINS) {
optionValue = options._parseDomainWhitelist(optionValue);
}
chrome.storage.local.set({
[optionKey]: optionValue
});
};
/**
* Initializations
*/
document.addEventListener('DOMContentLoaded', options._onDocumentLoaded);
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="7.1673mm" width="7.2061mm" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 25.5334 25.395792">
<g transform="translate(177.77 -519.66)">
<path d="m-165 519.66c-2.6196 0-4.9735 0.71508-7.2323 2.1971-0.9279 0.60864-2.7283 2.4092-3.337 3.337-1.4712 2.2424-2.1972 4.6154-2.1972 7.1819 0 2.5788 0.7141 4.9223 2.1797 7.1552 0.6309 0.96123 2.4192 2.7501 3.3802 3.3808 1.4791 0.97083 3.2841 1.71 4.9268 2.0176 1.0838 0.20297 3.9457 0.15209 5.0159-0.0894 2.4596-0.55481 4.4742-1.6723 6.29-3.4887 2.4847-2.4856 3.7408-5.4989 3.7408-8.9756 0-3.4682-1.2629-6.498-3.7405-8.9756-2.4919-2.4919-5.5045-3.7404-9.0264-3.7404z" fill="#7db69f"/>
<path d="m-165.02 528.24c-0.8699 0-1.6514 0.23746-2.4016 0.72959-0.3081 0.20212-0.9061 0.80004-1.1081 1.1081-0.4886 0.74466-0.7298 1.5326-0.7298 2.3849 0 0.85636 0.2371 1.6346 0.724 2.3761 0.2094 0.3192 0.8033 0.91326 1.1224 1.1227 0.4911 0.32239 1.0906 0.56785 1.6361 0.67001 0.3598 0.0673 1.3102 0.0504 1.6658-0.0297 0.8167-0.18424 1.4856-0.55532 2.0886-1.1585 0.8251-0.8254 1.2423-1.826 1.2423-2.9806 0-1.1517-0.4195-2.1578-1.2421-2.9806-0.8277-0.82751-1.8279-1.2421-2.9976-1.2421z" fill="#4a826c"/>
<path d="m-2404.4 671.18c-3.2399-0.0194-6.3107 1.2365-8.6289 3.5547 0 0.002 0 0.004-0.01 0.006-1.9541 1.9569-3.1473 4.4242-3.4687 7.1758-0.1336 1.143-0.1324 1.8177 0.2265 2.3984 0.3941 0.63745 0.9181 0.94336 1.6758 0.94336 0.2981 0 0.6535-0.10695 0.916-0.24414 0.2434-0.12713 0.6126-0.46272 0.7539-0.69141 0.065-0.10555 0.202-0.39493 0.2403-0.56641 0.053-0.23546 0.061-0.41065 0.084-0.74218 0.088-1.2626 0.2865-2.0912 0.7089-3.0312 0.4385-0.97557 0.9254-1.6871 1.6778-2.4395 1.2078-1.2078 2.6659-1.965 4.3828-2.2754 0.3293-0.0595 0.7416-0.0624 1.2617-0.0684s1.0247-0.004 1.3828 0.0469c0.3661 0.0518 0.6053 0.0832 0.9219 0.0391 0.2645-0.0368 0.6003-0.19398 0.791-0.32031 0.8224-0.54467 1.1248-1.5151 0.707-2.4219a0.6513 0.6513 0 0 1 0 -0.002c-0.1439-0.31257-0.5075-0.75154-0.8496-0.92969-0.4136-0.21541-0.8031-0.27857-1.3769-0.3457-0.4667-0.0546-0.9332-0.0832-1.3985-0.0859zm9.3692 6.3516c-1.074-0.004-1.9883 0.87522-1.9883 1.957 0 1.3647 1.5564 2.3925 2.7988 1.8066 0.3338-0.1574 0.8593-0.69555 0.9922-1.0137 0.5288-1.2658-0.423-2.7422-1.8008-2.75zm-1.291 9.6602c-0.5015 0.009-1.1313 0.39448-1.4707 0.78906-0.7801 0.90716-0.9293 1.0694-1.2911 1.3887-1.0664 0.94113-2.4514 1.6118-3.957 1.9062-0.394 0.0771-0.8958 0.072-1.4824 0.0664-0.5866-0.006-1.0998-0.0118-1.4941-0.0957l0.1328 0.0137a0.6513 0.6513 0 0 1 -0.1328 -0.0137c-1.5797-0.33594-2.8091-0.96601-4.0195-2.0606-0.3529-0.31903-0.5674-0.50965-0.8692-0.67969-0.2288-0.12895-0.689-0.22851-0.8945-0.22851-1.03 0-1.951 0.94359-1.9551 1.9688v0.002a0.6513 0.6513 0 0 1 0 0.002c0 0.26313 0.1216 0.80286 0.3028 1.0781 0.2346 0.35637 0.5009 0.59192 0.957 0.99805 1.8218 1.622 4.2177 2.6942 6.6543 2.9746 0.7641 0.0879 1.9155 0.0871 2.6895 0.002 2.1894-0.23969 4.2945-1.0791 6.0489-2.4082 0.7055-0.53445 1.6855-1.491 2.2129-2.1816 0.2682-0.35126 0.4557-0.64063 0.5664-1.0176 0.098-0.33319 0.076-0.788-0.01-1.0938-0.1165-0.42605-0.279-0.59899-0.5546-0.85157-0.2646-0.24237-0.4858-0.39738-0.8809-0.49218-0.1798-0.0432-0.3602-0.0694-0.5527-0.0664z" fill-rule="evenodd" transform="matrix(.82404 0 0 .82404 1816.1 -30.489)" fill="#f1f7f5"/>
</g>
</svg>
/**
* Sections
*/
body {
background-color: #f0f0f0;
color: #555;
cursor: default;
font-family: 'Noto Sans', Arial, sans-serif !important;
font-size: 75%;
margin: 0 auto;
overflow: hidden;
padding: 0;
max-width: 348px;
}
header {
align-items: center;
border-bottom: solid #d3d3d3 1px;
display: flex;
position: relative;
}
.panel {
overflow: hidden;
padding: 10px 8px;
}
.panel:not(:last-child) {
border-bottom: 1px solid #d8d8d8;
}
.subpanel {
overflow: hidden;
}
footer {
overflow: hidden;
padding: 8px;
}
/**
* Fonts
*/
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 400;
src: url('../../modules/noto-sans/noto-sans.woff2')
format('woff2');
}
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 600;
src: url('../../modules/noto-sans/noto-sans-bold.woff2')
format('woff2');
}
@font-face {
font-family: 'Noto Sans';
font-style: italic;
font-weight: 400;
src: url('../../modules/noto-sans/noto-sans-italic.woff2')
format('woff2');
}
/**
* Headings
*/
.heading {
font-size: 14px;
font-weight: 600;
padding-left: 0;
}
.subheading {
font-weight: 600;
margin-bottom: 2px;
text-align: center;
}
/**
* Lists
*/
.list {
margin: 0;
padding: 8px 0 0;
}
.list-item {
background-color: #f7f7f7;
border: 1px solid #e4e4e4;
color: #737373;
font-weight: 600;
list-style: none;
margin: 0;
padding: 10px;
}
.sublist {
align-items: center;
background-color: #ececec;
border: 1px solid #e0e0e0;
box-shadow: inset 0px 2px 10px #e2e2e2;
list-style: none;
padding-left: 8px;
padding: 0;
}
.sublist:last-child {
border-bottom: 1px solid #e0e0e0;
}
.sublist-item {
border-bottom: 1px solid #e0e0e0;
color: #737373;
font-weight: 600;
padding: 10px;
}
.sublist-item:last-child {
border-bottom: none;
}
/**
* Icons
*/
.icon {
margin-right: 6px;
}
.icon-logo {
height: 26px;
padding: 14px 6px 14px 8px;
width: 26px;
}
/**
* Buttons
*/
.button {
-moz-user-select: none;
background-color: #f5f5f5;
border-radius: 2px;
border: 1px solid #cfcfcf;
color: #5f5f5f;
cursor: pointer;
float: right;
font-size: 12px;
padding: 5px 22px;
user-select: none;
}
.button:hover {
background-color: #fff;
}
.button:active {
background-color: #dedede;
}
.button-toggle {
border-color: #d8d8d8;
color: #bbb;
}
.button-toggle.active {
border-color: #cfcfcf;
color: #339a6f;
}
/**
* Links
*/
.link-text {
color: #bdbdbd;
cursor: pointer;
float: left;
font-size: 13px;
padding-left: 4px;
padding-top: 5px;
text-decoration: none;
}
.link-text:hover {
color: #777;
text-decoration: underline;
}
/**
* Miscellaneous
*/
.badge {
background-color: #6bb798;
border-radius: 10px;
color: #fff;
font-family: monospace;
font-size: 13px;
font-weight: 600;
margin-right: 8px;
padding: 3px 15px;
}
.counter {
font-size: 36px;
font-weight: 600;
margin-top: 4px;
text-align: center;
}
.description {
color: #777;
font-style: italic;
margin: 0 6px;
text-align: center;
}
.hidden {
display: none;
}
.label-version {
color: #6aac91;
font-size: 9px;
}
.label-domain {
color: #bbb;
display: flex;
font-style: italic;
overflow: hidden;
padding: 6px 0 0 4px;
white-space: nowrap;
}
.side-note {
color: #a5a5a5;
font-style: italic;
font-weight: 400;
}
/**
* Compatibility
*/
@media screen and (-webkit-min-device-pixel-ratio: 0) {
body {
width: 348px;
}
}
<!DOCTYPE html>
<html>
<head>
<title>Decentraleyes Popup</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="popup.css">
<script defer src="../../modules/fontawesome/icon-bundle.min.js"></script>
<script defer src="../../modules/fontawesome/fontawesome.min.js"></script>
</head>
<body>
<script src="../../core/constants.js"></script>
<script src="../../modules/internal/helpers.js"></script>
<script src="popup.js"></script>
<header>
<img class="icon-logo" src="icon.svg" alt="Extension Icon">
<div class="heading">Decentraleyes <sup id="version-label" class="label-version"></sup></div>
</header>
<section class="content">
<div id="website-context" class="panel hidden">
<div class="subpanel">
<div id="protection-toggle-button" class="button button-toggle active">
<i class="fai fa-power-off" data-fa-transform="grow-2 down-.5"></i>
</div>
<div class="label-domain">
<i class="icon fai fa-globe fa-lg" data-fa-transform="down-1"></i>
<span id="domain-indicator"></span>
</div>
</div>
</div>
<div id="extension-context" class="panel">
<div id="injection-counter" class="counter">0</div>
<div class="subheading" data-i18n-content="amountInjectedTitle"></div>
<div class="description" data-i18n-content="amountInjectedDescription"></div>
</div>
</section>
<footer>
<span id="testing-utility-link" class="link-text">decentraleyes.org/test</span>
<div id="options-button" class="button" data-i18n-title="optionsTitle">
<i class="fai fa-cog" data-fa-transform="grow-2 down-.5"></i>
</div>
</footer>
</body>
</html>
/**
* Main Popup Page
* Belongs to Decentraleyes.
*
* @author Thomas Rientjes
* @since 2016-08-09
* @license MPL 2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
'use strict';
/**
* Popup
*/
var popup = {};
/**
* Private Methods
*/
popup._renderContents = function () {
helpers.insertI18nContentIntoDocument(document);
helpers.insertI18nTitlesIntoDocument(document);
popup._renderNonContextualContents();
if (popup._backgroundPage !== null) {
popup._determineTargetTab()
.then(popup._renderContextualContents);
}
};
popup._renderNonContextualContents = function () {
let versionLabelElement, counterElement, testingUtilityLinkElement, optionsButtonElement;
versionLabelElement = document.getElementById('version-label');
counterElement = document.getElementById('injection-counter');
testingUtilityLinkElement = document.getElementById('testing-utility-link');
optionsButtonElement = document.getElementById('options-button');
versionLabelElement.innerText = popup._version;
counterElement.innerText = helpers.formatNumber(popup._amountInjected);
testingUtilityLinkElement.addEventListener('mouseup', popup._onTestingUtilityLinkClicked);
optionsButtonElement.addEventListener('mouseup', popup._onOptionsButtonClicked);
};
popup._renderContextualContents = function () {
let injections, groupedInjections;
popup._domain = helpers.extractDomainFromUrl(popup._targetTab.url);
popup._requestAnalyzer = popup._backgroundPage.requestAnalyzer;
popup._stateManager = popup._backgroundPage.stateManager;
if (popup._domain !== null) {
popup._domain = helpers.normalizeDomain(popup._domain);
popup._renderDomainWhitelistPanel();
}
injections = popup._stateManager.tabs[popup._targetTab.id].injections;
groupedInjections = popup._groupResourceInjections(injections);
if (Object.keys(groupedInjections).length > 0) {
popup._renderInjectionPanel(groupedInjections);
}
};
popup._renderDomainWhitelistPanel = function () {
let websiteContextElement, protectionToggleElement, domainIndicatorElement;
websiteContextElement = document.getElementById('website-context');
protectionToggleElement = document.getElementById('protection-toggle-button');
domainIndicatorElement = document.getElementById('domain-indicator');
protectionToggleElement.setAttribute('dir', popup._scriptDirection);
domainIndicatorElement.innerText = popup._domain;
if (popup._requestAnalyzer.whitelistedDomains[popup._domain]) {
let enableProtectionTitle = chrome.i18n.getMessage('enableProtectionTitle');
protectionToggleElement.setAttribute('class', 'button button-toggle');
protectionToggleElement.addEventListener('click', popup._enableProtection);
protectionToggleElement.setAttribute('title', enableProtectionTitle);
} else {
let disableProtectionTitle = chrome.i18n.getMessage('disableProtectionTitle');
protectionToggleElement.setAttribute('class', 'button button-toggle active');
protectionToggleElement.addEventListener('click', popup._disableProtection);
protectionToggleElement.setAttribute('title', disableProtectionTitle);
}
websiteContextElement.setAttribute('class', 'panel');
};
popup._renderInjectionPanel = function (groupedInjections) {
let websiteContextElement, injectionOverviewElement;
websiteContextElement = document.getElementById('website-context');
injectionOverviewElement = popup._createInjectionOverviewElement(groupedInjections);
websiteContextElement.append(injectionOverviewElement);
};
popup._enableProtection = function () {
popup._stateManager.deleteDomainFromWhitelist(popup._domain)
.then(popup._onProtectionToggled);
};
popup._disableProtection = function () {
popup._stateManager.addDomainToWhitelist(popup._domain)
.then(popup._onProtectionToggled);
};
popup._determineBackgroundPage = function () {
return new Promise((resolve) => {
chrome.runtime.getBackgroundPage(function (backgroundPage) {
popup._backgroundPage = backgroundPage;
resolve();
});
});
};
popup._determineTargetTab = function () {
return new Promise((resolve) => {
chrome.tabs.query({'active': true, 'currentWindow': true}, function (tabs) {
popup._targetTab = tabs[0];
resolve();
});
});
};
popup._determineAmountInjected = function () {
return new Promise((resolve) => {
chrome.storage.local.get(Setting.AMOUNT_INJECTED, function (items) {
popup._amountInjected = items.amountInjected || 0;
resolve();
});
});
};
popup._groupResourceInjections = function (injections) {
let groupedInjections = {};
for (let index in injections) {
let {source} = injections[index];
groupedInjections[source] = groupedInjections[source] || [];
groupedInjections[source].push(injections[index]);
}
return groupedInjections;
};
popup._createInjectionOverviewElement = function (groupedInjections) {
let injectionOverviewElement = document.createElement('ul');
injectionOverviewElement.setAttribute('class', 'list');
for (let source in groupedInjections) {
let injectionGroupHeaderElement, injectionGroupElement, cdn;
cdn = groupedInjections[source];
injectionGroupHeaderElement = popup._createInjectionGroupHeaderElement(source, cdn);
injectionGroupElement = popup._createInjectionGroupElement(source, cdn);
injectionOverviewElement.appendChild(injectionGroupHeaderElement);
injectionOverviewElement.appendChild(injectionGroupElement);
}
return injectionOverviewElement;
};
popup._createInjectionGroupHeaderElement = function (source, cdn) {
let injectionGroupHeaderElement, badgeElement, badgeTextNode, cdnNameTextNode;
injectionGroupHeaderElement = document.createElement('li');
injectionGroupHeaderElement.setAttribute('class', 'list-item');
badgeElement = document.createElement('span');
badgeElement.setAttribute('class', 'badge');
badgeTextNode = document.createTextNode(cdn.length);
badgeElement.appendChild(badgeTextNode);
cdnNameTextNode = document.createTextNode(helpers.determineCdnName(source));
injectionGroupHeaderElement.appendChild(badgeElement);
injectionGroupHeaderElement.appendChild(cdnNameTextNode);
return injectionGroupHeaderElement;
};
popup._createInjectionGroupElement = function (source, cdn) {
let injectionGroupElement;
injectionGroupElement = document.createElement('ul');
injectionGroupElement.setAttribute('class', 'sublist');
for (let injection of cdn) {
let injectionElement = popup._createInjectionElement(injection);
injectionGroupElement.appendChild(injectionElement);
}
return injectionGroupElement;
};
popup._createInjectionElement = function (injection) {
let injectionElement, filename, name, nameTextNode, noteElement, noteTextNode;
injectionElement = document.createElement('li');
injectionElement.setAttribute('class', 'sublist-item');
filename = helpers.extractFilenameFromPath(injection.path);
name = helpers.determineResourceName(filename);
nameTextNode = document.createTextNode(`- ${name}`);
injectionElement.appendChild(nameTextNode);
noteElement = document.createElement('span');
noteElement.setAttribute('class', 'side-note');
noteTextNode = document.createTextNode(` v${injection.version}`);
noteElement.appendChild(noteTextNode);
injectionElement.appendChild(noteElement);
return injectionElement;
};
popup._close = function () {
chrome.runtime.getPlatformInfo(function (information) {
if (information.os === chrome.runtime.PlatformOs.ANDROID) {
chrome.tabs.getCurrent(function (tab) {
chrome.tabs.remove(tab.id);
});
} else {
window.close();
}
});
};
/**
* Event Handlers
*/
popup._onDocumentLoaded = function () {
let manifest, language;
manifest = chrome.runtime.getManifest();
language = navigator.language;
popup._version = helpers.formatVersion(manifest.version);
popup._scriptDirection = helpers.determineScriptDirection(language);
popup._determineBackgroundPage()
.then(popup._determineAmountInjected)
.then(popup._renderContents);
};
popup._onTestingUtilityLinkClicked = function (event) {
if (event.button === 0 || event.button === 1) {
chrome.tabs.create({
'url': 'https://decentraleyes.org/test',
'active': (event.button === 0)
});
}
if (event.button === 0) {
window.close();
}
};
popup._onOptionsButtonClicked = function () {
chrome.runtime.openOptionsPage();
return window.close();
};
popup._onProtectionToggled = function () {
let bypassCache = (typeof browser === 'undefined');
chrome.tabs.reload(popup._targetTab.id, {bypassCache});
popup._close();
};
/**
* Initializations
*/
document.addEventListener('DOMContentLoaded', popup._onDocumentLoaded);
pages/welcome/favicon.ico

21.9 KiB

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="139.98mm" width="213.68mm" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 757.14843 495.97448" xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs>
<linearGradient id="a" y2="-1041.7" gradientUnits="userSpaceOnUse" x2="-2153.9" gradientTransform="matrix(.73610 0 0 1.1184 971.67 1120)" y1="-1983.7" x1="-2153.9">
<stop stop-color="#7c9437" offset="0"/>
<stop stop-color="#eff4e2" offset="1"/>
</linearGradient>
</defs>
<g transform="translate(1012.9 489.91)">
<path d="m-633.52-289.08c-4.2555-0.0136-8.5155 0-12.777 0.0312-127.91 0.89658-252.53 19.355-365.63 52.92a378.57 378.57 0 0 0 -0.9259 18.506 378.57 378.57 0 0 0 0.9472 26.779 378.57 378.57 0 0 0 4.5606 37.566 378.57 378.57 0 0 0 8.2871 36.924 378.57 378.57 0 0 0 11.934 35.91 378.57 378.57 0 0 0 15.457 34.541 378.57 378.57 0 0 0 18.83 32.824 378.57 378.57 0 0 0 13.689 19.143h609.77a378.57 378.57 0 0 0 7.5468 -9.9279 378.57 378.57 0 0 0 19.779 -32.262 378.57 378.57 0 0 0 16.459 -34.074 378.57 378.57 0 0 0 12.977 -35.547 378.57 378.57 0 0 0 9.3634 -36.666 378.57 378.57 0 0 0 5.6543 -37.416 378.57 378.57 0 0 0 1.8905 -37.795 378.57 378.57 0 0 0 -0.60143 -17.018c-116.53-35.116-245.29-54.153-377.21-54.44z" fill-rule="evenodd" fill="url(#a)"/>
<g transform="translate(-3065.9 1490.7)">
<path d="m-8140.9-2348.7a274.29 274.29 0 0 0 -266.58 211.04c7.1369-1.3966 14.205-2.9209 21.4-4.2051 15.036-2.6835 30.198-5.1201 45.469-7.3067 15.271-2.1865 30.653-4.1238 46.129-5.8046 15.476-1.6809 31.048-3.1051 46.699-4.2715 15.651-1.1665 31.383-2.0735 47.18-2.7168 15.797-0.6434 31.658-1.0233 47.57-1.1348 16.954-0.1188 33.863 0.067 50.707 0.5527 16.844 0.4858 33.623 1.2711 50.32 2.3516s33.313 2.4557 49.826 4.1211 32.926 3.6208 49.219 5.8613c16.293 2.2406 32.467 4.7664 48.504 7.5723 10.201 1.7849 20.245 3.8763 30.33 5.8867a274.29 274.29 0 0 0 -266.77 -211.94z" transform="translate(10572 368.09)" fill="#69ab90"/>
<path d="m-8140.5-2258.2a184.16 184.16 0 0 0 -165.9 104.74c3.9985-0.4699 7.9455-1.0683 11.957-1.5039 15.476-1.6809 31.048-3.1051 46.699-4.2715 15.651-1.1665 31.383-2.0735 47.18-2.7168 15.797-0.6434 31.658-1.0233 47.57-1.1348 16.954-0.1188 33.863 0.067 50.707 0.5527 16.844 0.4858 33.623 1.2711 50.32 2.3516s33.313 2.4557 49.826 4.1211c9.3701 0.945 18.626 2.1953 27.928 3.3262a184.16 184.16 0 0 0 -166.29 -105.46z" transform="translate(10572 368.09)" fill="#4a856d"/>
<path d="m-8140.9-2237c-57.78 0.068-111.19 30.788-140.3 80.699 42.151-4.1659 84.969-6.4492 128.16-6.752 51.484-0.3609 102.54 2.0951 152.66 7.2168-29.034-50.162-82.569-81.082-140.53-81.164z" transform="translate(10572 368.09)" fill="#d9ccb5"/>
<path d="m-8139.6-2326.4c-68.213-0.4078-132.43 25.777-181.27 74.619-31.322 31.322-53.165 68.409-64.869 109.85 21.087-3.7573 42.424-7.0203 63.961-9.7968 0.1062-0.2386 0.2051-0.474 0.3125-0.7129 10.523-23.415 22.717-41.107 40.772-59.162 29.234-29.234 64.842-47.747 106.23-55.229 14.678-2.6535 47.206-2.9306 64.086-0.5429 14.755 2.0871 19.279 1.4609 27.205-3.7891 11.038-7.311 15.491-22.356 10.088-34.086-5.7671-12.52-13.568-16.585-37.066-19.334-9.8746-1.1551-19.702-1.7562-29.447-1.8145zm209.14 141.75c-15.595-0.072-28.373 12.42-28.373 27.73 0 2.0809 0.2081 4.0855 0.5879 6.0059 17.56 2.3451 34.986 5.0152 52.252 8.0156 0.3927-0.7733 0.7686-1.5899 1.1309-2.457 7.6967-18.421-5.8421-39.204-25.598-39.295z" fill-rule="evenodd" transform="translate(10572 368.09)" fill="#e1eee9"/>
<path d="m2566.6-1883.9c-3.0097 3.1329-6.9452 2.2975-14.708-2.4482-4.0467-2.2446-5.5995-3.6343-9.6847-5.7832l-6.0229-3.1961-2.0305 3.9932-2.0327 3.9906-3.4678-4.969c-8.9934-12.89-18.056-26.474-17.742-26.592 4.2273-0.3503 19.763-1.3532 37.471-2.7026 0 0-1.0853 2.1672-2.2943 4.5888l-2.0055 4.2775 6.5539 3.5215c3.6047 1.9372 9.4209 5.7407 12.927 8.4524 1.0018 0.7747 1.7262 1.4006 2.4531 2.0301 4.5629 4.4076 4.9708 7.6508 2.557 12.032-0.6314 1.1465-1.2782 2.081-1.9728 2.8041z" fill="#fff"/>
<path d="m-432.68-16.955c-0.92625 0.11186-1.7636 0.61843-2.5957 1.4668-2.5338 2.583-1.7893 5.0501 3.1855 10.545 2.4906 2.751 6.0466 6.7358 7.9004 8.8555 3.7538 4.2926 5.5909 4.8261 8.1582 2.3672 2.8579-2.737 2.1581-5.0574-3.6914-12.246-6.6046-8.1165-10.178-11.324-12.957-10.988z" transform="matrix(1.9024 0 0 1.9024 3412 -1843.7)" fill="#fff"/>
</g>
<path style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;text-decoration-style:solid;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none" d="m-1011-254.39a378.57 378.57 0 0 0 -0.9141 18.264c113.1-33.564 237.73-52.023 365.63-52.92 136.38-0.95605 269.7 18.16 389.99 54.408a378.57 378.57 0 0 0 -0.34565 -9.7598 378.57 378.57 0 0 0 -1.0644 -8.7656c-120.38-35.545-253.06-54.097-388.7-53.147-127.3 0.89224-251.38 18.941-364.6 51.92z" fill="#4a856d"/>
<g fill="#69ab90">
<path d="m-596.16-130.58h-14.32v72.537h14.32v-30.165h14.789v30.165h14.32v-72.537h-14.32v29.93h-14.789v-29.93z"/>
<path d="m-556.38-130.58v72.537h39.203v-12.442h-24.883v-17.723h19.719v-12.442h-19.719v-17.489h24.883v-12.442h-39.203z"/>
<path d="m-472.89-58.044v-12.442h-21.714v-60.095h-14.32v72.537h36.034z"/>
<path d="m-430.48-58.044v-12.442h-21.714v-60.095h-14.32v72.537h36.034z"/>
<path d="m-403.8-69.781c-2.2301 0-3.9907-0.93899-4.9297-2.3475-1.2911-1.878-1.6432-4.8123-1.6432-7.2772v-29.696c0-2.5822 0.23475-5.2818 1.5259-7.2772 0.93899-1.4085 2.817-2.4648 5.0471-2.4648h1.4085c2.3475 0 4.2254 0.93899 5.1644 2.3475 1.2911 1.9954 1.4085 4.8123 1.4085 7.3946v29.696c0 2.4648-0.23475 5.3992-1.5259 7.2772-0.93899 1.4085-2.6996 2.3475-5.0471 2.3475h-1.4085zm-20.893-11.385c0 5.7513 0.58687 12.089 4.1081 16.784 3.4038 4.5776 9.1552 7.0424 17.489 7.0424 8.3335 0 14.085-2.6996 17.489-7.2772 3.5212-4.695 4.2255-11.033 4.2255-16.667v-26.174c0-5.7513-0.70425-12.089-4.2255-16.784-3.4038-4.5776-9.1552-6.925-17.489-6.925-8.3335 0-13.967 2.6996-17.371 7.2772-3.5212 4.695-4.2254 10.916-4.2254 16.667v26.057z"/>
</g>
<g fill="#69ab90">
<path d="m-613.41-201.17c0 5.7513 1.1737 9.8594 3.8733 13.498 4.1081 5.2818 11.268 8.3335 16.902 11.62 1.7606 0.93899 3.1691 1.878 4.2254 3.0517 0.93899 1.2911 1.6432 2.6996 1.6432 4.5776 0.11738 2.5822-0.58686 4.8123-1.9954 6.2208-1.4085 1.5259-3.5212 2.3475-6.3382 2.3475h-1.4085c-4.5776 0-8.6856-1.0564-13.967-2.6996l-2.1127 11.855c4.4602 1.878 11.503 3.5212 17.606 3.5212 7.5119-0.11737 14.789-2.1127 18.545-7.3945 3.1691-4.3428 3.9907-9.5073 3.9907-14.554 0-5.7513-1.4085-9.6246-3.8733-12.559-1.1737-1.4085-2.5822-2.5822-4.3428-3.6386-4.695-3.0517-10.564-4.9297-14.906-7.9814-2.3475-1.7606-3.8733-3.8733-3.8733-6.925 0-2.6996 0.58687-4.5776 1.7606-5.8687 1.2911-1.4085 3.1691-1.9954 5.8687-1.9954 4.695 0 8.6857 0.93899 13.146 2.1127l2.1127-11.62c-5.1644-1.9954-10.798-3.0517-16.432-2.9343-6.925 0.11737-12.442 2.2301-15.963 6.3382-2.6996 3.0517-4.4602 7.7467-4.4602 13.028z"/>
<path d="m-536-160.79 2.3475 13.146h14.202v-3.0517l-15.141-69.485h-18.076l-15.024 68.898v3.6386h13.85l2.3475-13.146h15.493zm-7.7467-43.663 5.5166 31.221h-11.033l5.5166-31.221z"/>
<path d="m-474.6-216.55v-3.6386h-12.676l-9.8594 31.574-9.9768-31.574h-13.381v3.756l16.198 44.367v24.414h14.437v-25.118l15.259-43.78z"/>
<path d="m-471.74-201.17c0 5.7513 1.1737 9.8594 3.8733 13.498 4.1081 5.2818 11.268 8.3335 16.902 11.62 1.7606 0.93899 3.1691 1.878 4.2255 3.0517 0.93899 1.2911 1.6432 2.6996 1.6432 4.5776 0.11737 2.5822-0.58687 4.8123-1.9954 6.2208-1.4085 1.5259-3.5212 2.3475-6.3382 2.3475h-1.4085c-4.5776 0-8.6856-1.0564-13.967-2.6996l-2.1127 11.855c4.4602 1.878 11.503 3.5212 17.606 3.5212 7.5119-0.11737 14.789-2.1127 18.545-7.3945 3.1691-4.3428 3.9907-9.5073 3.9907-14.554 0-5.7513-1.4085-9.6246-3.8733-12.559-1.1737-1.4085-2.5822-2.5822-4.3428-3.6386-4.695-3.0517-10.564-4.9297-14.906-7.9814-2.3475-1.7606-3.8733-3.8733-3.8733-6.925 0-2.6996 0.58687-4.5776 1.7606-5.8687 1.2911-1.4085 3.1691-1.9954 5.8687-1.9954 4.695 0 8.6857 0.93899 13.146 2.1127l2.1127-11.62c-5.1644-1.9954-10.798-3.0517-16.432-2.9343-6.925 0.11737-12.442 2.2301-15.963 6.3382-2.6996 3.0517-4.4602 7.7467-4.4602 13.028z"/>
</g>
<path d="m-642.99-219.72h8.3121v161.84h-8.3121z" fill="#4a856d"/>
<g fill="#4a856d">
<path d="m-887.97-91.967v12.157h70.466v-23.864h-34.895l21.162-34.895c8.5549-13.958 16.209-27.466 16.209-44.351 0-13.283-4.2775-22.963-11.932-28.817-6.5288-5.178-15.759-7.6544-27.241-7.8795-10.356-0.22513-18.01 1.801-27.916 5.8534l4.0523 22.063c8.5549-2.2513 12.382-4.0523 21.387-4.0523 5.178 0 10.131 1.801 12.832 6.7539 1.5759 2.7016 2.2513 6.0785 2.0262 9.9057-0.22513 10.581-5.8534 22.288-11.482 31.068l-34.67 56.057z"/>
<path d="m-770.65-107.05h-26.34v27.241h26.34v-27.241z"/>
<path d="m-750.43-124.39c0 11.031 1.3508 23.188 8.1047 32.194 6.5288 8.7801 16.434 13.508 32.419 13.508 15.984 0 25.89-5.178 32.419-13.958 6.7539-9.0052 8.1047-21.162 8.1047-31.968v-49.754c0-11.031-1.3508-23.188-8.1047-32.194-6.5288-8.7801-16.434-13.283-32.419-13.283-15.984 0-25.89 4.9529-32.419 13.733-6.7539 9.0052-8.1047 21.162-8.1047 32.194v49.529zm39.848 21.838c-4.2775 0-7.4293-1.801-9.2303-4.5026-2.4764-3.6021-3.1518-9.2303-3.1518-13.958v-56.508c0-4.9529 0.67539-10.356 3.1518-14.183 1.801-2.7016 4.9528-4.5026 9.2303-4.5026h1.3508c4.2775 0 7.4293 1.801 9.2303 4.5026 2.4764 3.8272 3.1518 9.2303 3.1518 14.183v56.508c0 4.7277-0.67539 10.356-3.1518 13.958-1.801 2.7016-4.9529 4.5026-9.2303 4.5026h-1.3508z"/>
</g>
</g>
</svg>
/**
* Sections
*/
body {
background-color: #eff4e2;
color: #777;
font-size: 14px;
min-width: 256px;
padding: 25px 10px;
}
h1 {
font-family: 'Noto Sans', Arial, sans-serif;
font-size: 24px;
font-weight: 400;
margin: 15px auto 20px;
max-width: 750px;
}
a {
color: #777;
}
.btn-panel {
font-family: 'Noto Sans', Arial, sans-serif;
margin: 35px auto;
max-width: 750px;
}
.topic-badge {
background-color: #fcfcfc;
border-radius: 100px;
border: 4px solid #e6e6e6;
color: #5a8f79;
display: inline-block;
font-size: 48px;
line-height: 0;
margin: 0 20px 20px;
padding: 16px;
}
.topic-badge:first-child {
margin-left: 0;
}
.topic-badge:last-child {
margin-right: 0;
}
/**
* Fonts
*/
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 400;
src: url('../../modules/noto-sans/noto-sans.woff2')
format('woff2');
}
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 600;
src: url('../../modules/noto-sans/noto-sans-bold.woff2')
format('woff2');
}
@font-face {
font-family: 'Noto Sans';
font-style: italic;
font-weight: 400;
src: url('../../modules/noto-sans/noto-sans-italic.woff2')
format('woff2');
}
/**
* Buttons
*/
.btn {
color: #fff;
font-weight: 600;
margin-right: 15px;
padding: 11px 17px;
text-decoration: none;
}
.btn-text {
margin-left: 10px;
}
.btn-github {
background-color: #24292e;
}
.btn-github:hover {
background-color: #42474c;
}
.btn-website {
background-color: #169cff;
}
.btn-website:hover {
background-color: #008ff5;
}
.btn-bitcoin {
background-color: #f7931a;
}
.btn-bitcoin:hover {
background-color: #f58700;
}
.btn-monero {
background-color: #f26822;
}
.btn-monero:hover {
background-color: #ed5407;
}
/**
* Miscellaneous
*/
.notice {
align-items: center;
display: flex;
font-family: 'Noto Sans', Arial, sans-serif;
margin-left: auto;
margin-right: auto;
max-width: 750px;
text-align: left;
}
.logo {
display: block;
height: 145px;
margin: 15px auto 50px;
}
.subtle-hint {
background-color: #fcfcfc;
border-radius: 4px;
border: 1px solid #e6e6e6;
color: #777;
font-size: 14px;
margin-bottom: 20px;
padding: 8px 11px;
}
.topic-label {
color: #5a8f79;
font-style: normal;
font-weight: bold;
}
.color-purple {
color: #9e608e;
}
/**
* Media Queries
*/
@media screen and (max-width: 550px) {
.btn {
padding: 13px 18px 12px
}
.btn-text {
display: none
}
}
<!DOCTYPE html>
<html>
<head>
<title>2.0 Says Hello - Decentraleyes</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="welcome.css">
<script defer src="../../modules/fontawesome/icon-bundle.min.js"></script>
<script defer src="../../modules/fontawesome/fontawesome.min.js"></script>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
<img src="logo.svg" alt="Decentraleyes" class="logo"/>
<div class="container">
<h1>For a smoother experience</h1>
<div class="notice">
<span class="subtle-hint"><span class="topic-label">Configure HTTPS Everywhere</span><br>There's no need to read any further, unless you actually use Decentraleyes in combination with the HTTPS Everywhere extension. If you do, please follow this <a href="https://decentraleyes.org/configure-https-everywhere/" target="_blank">short guide</a> to prevent, or resolve, any conflicts.</span>
</div>
<h1>What's new in version 2.0?</h1>
<div class="notice">
<span class="subtle-hint"><span class="topic-label">Improved Configurability</span><br>The options screen has been updated to give you more control over the extension. Settings that impact privacy, or website functionality, are now explicitly labeled as advanced.</span>
<div class="topic-badge"><i class="fai fa-cog"></i></div>
</div>
<div class="notice">
<div class="topic-badge color-purple"><i class="fai fa-power-off"></i></div>
<span class="subtle-hint"><span class="topic-label color-purple">Simplified Whitelist Management</span><br>Excluding the domain you're visiting from inspections is now easier than ever. Just open up the popup panel, and use the dedicated button, to disable protection for said site.</span>
</div>
<h1>Learn more, or contribute</h1>
<div class="btn-panel">
<a class="btn btn-website" href="https://decentraleyes.org" target="_blank"><i class="btn-icon fai fa-globe" data-fa-transform="grow-2"></i><span class="btn-text">Website</span></a>
<a class="btn btn-github" href="https://github.com/Synzvato/decentraleyes" target="_blank"><i class="btn-icon fai fa-github-alt" data-fa-transform="grow-2"></i><span class="btn-text">GitHub</span></a>
<a class="btn btn-bitcoin" href="https://decentraleyes.org/donate/bitcoin/" target="_blank"><i class="btn-icon fai fa-btc" data-fa-transform="grow-2"></i><span class="btn-text">Bitcoin</span></a>
<a class="btn btn-monero" href="https://decentraleyes.org/donate/monero/" target="_blank"><i class="btn-icon fai fa-monero" data-fa-transform="grow-2"></i><span class="btn-text">Monero</span></a>
</div>
</div>
</body>
</html>
@/*
/*
AngularJS v1.0.1
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
......
@/*
/*
AngularJS v1.0.2
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
......
@/*
/*
AngularJS v1.0.3
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
......
@/*
/*
AngularJS v1.0.4
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
......
@/*
/*
AngularJS v1.0.5
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
......
@/*
/*
AngularJS v1.0.6
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
......
@/*
/*
AngularJS v1.0.8
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
......
@/*
/*
AngularJS v1.2.0
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
......
@/*
/*
AngularJS v1.2.1
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
......
@/*
/*
AngularJS v1.2.10
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
......
@/*
/*
AngularJS v1.2.15
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
......