Verified Commit 8696556b authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Improve render performance of the popup panel

parent d1ca712f
......@@ -240,7 +240,7 @@ footer {
}
.hidden {
display: none;
display: none !important;
}
.label-version {
......
......@@ -23,52 +23,56 @@
<script src="popup.js"></script>
<header>
<div id="wrapper" class="hidden">
<img class="icon-logo" src="icon.svg" alt="Extension Icon">
<div class="heading">Decentraleyes <sup id="version-label" class="label-version"></sup></div>
<header>
</header>
<img class="icon-logo" src="icon.svg" alt="Extension Icon">
<div class="heading">Decentraleyes <sup id="version-label" class="label-version"></sup></div>
<section class="content">
</header>
<div id="website-context" class="panel hidden">
<section class="content">
<div class="subpanel">
<div id="website-context" class="panel hidden">
<div id="protection-toggle-button" class="button button-toggle active" tabindex="0">
<i class="fai fa-power-off" data-fa-transform="grow-2 down-.5"></i>
</div>
<div class="subpanel">
<div id="protection-toggle-button" class="button button-toggle active" tabindex="0">
<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 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="extension-context" class="panel">
<div id="injection-counter" class="counter">0</div>
<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 class="subheading" data-i18n-content="amountInjectedTitle"></div>
<div class="description" data-i18n-content="amountInjectedDescription"></div>
</div>
</div>
</section>
</section>
<footer>
<footer>
<span id="testing-utility-link" class="link-text" tabindex="0">decentraleyes.org/test</span>
<span id="testing-utility-link" class="link-text" tabindex="0">decentraleyes.org/test</span>
<div id="options-button" class="button" data-i18n-title="optionsTitle" tabindex="0">
<i class="fai fa-cog" data-fa-transform="grow-2 down-.5"></i>
</div>
<div id="options-button" class="button" data-i18n-title="optionsTitle" tabindex="0">
<i class="fai fa-cog" data-fa-transform="grow-2 down-.5"></i>
</div>
</footer>
</footer>
</div>
</body>
......
......@@ -33,7 +33,8 @@ popup._renderContents = function () {
popup._determineTargetTab()
.then(popup._determineDomainWhitelistStatus)
.then(popup._determineResourceInjections)
.then(popup._renderContextualContents);
.then(popup._renderContextualContents)
.then(popup._showRenderedContents);
};
popup._renderNonContextualContents = function () {
......@@ -88,6 +89,10 @@ popup._renderContextualContents = function () {
}
};
popup._showRenderedContents = function () {
document.getElementById('wrapper').classList.remove('hidden');
};
popup._renderDomainWhitelistPanel = function () {
let websiteContextElement, protectionToggleElement, domainIndicatorElement;
......
Supports Markdown
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