Skip to content

Commit 542e4a0

Browse files
committed
Remove the Mozilla-VPN Banner Ad
1 parent 037a804 commit 542e4a0

File tree

3 files changed

+1
-70
lines changed

3 files changed

+1
-70
lines changed

src/css/popup.css

-32
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
--usercontext-bg-hover-color: #f0f0fa;
111111
--usercontext-bg-focus-color: #e0e0e6;
112112
--usercontext-bg-active-color: #cfcfd8;
113-
--moz-vpn-tout-shadow: 0 0 7px 0 #9498a25e;
114113
}
115114

116115
[data-theme="dark"] {
@@ -180,7 +179,6 @@
180179
--usercontext-bg-active-color: #5b5b66;
181180
--usercontext-bg-focus-color: #2b2a33;
182181
--usercontext-bg-hover-color: #52525e;
183-
--moz-vpn-tout-shadow: 0 0 7px 0 #7478825e;
184182
}
185183

186184
/* General Rules and Resets */
@@ -635,37 +633,8 @@ input:checked:hover:focus + .slider {
635633
background-color: var(--button-bg-active-color-primary);
636634
}
637635

638-
/* Mozilla VPN tout */
639-
640-
#moz-vpn-tout {
641-
opacity: 0;
642-
background-color: var(--panel-bg-color);
643-
visibility: visible;
644-
max-block-size: 500px;
645-
position: absolute;
646-
inset-block-end: var(--footerHeight);
647-
inset-inline-start: 0;
648-
inset-inline-end: 0;
649-
box-shadow: var(--moz-vpn-tout-shadow);
650-
animation: appear 0.2s ease-out 0.5s forwards;
651-
transition: opacity 0.1s ease-in-out, max-height 0.3s ease-in-out;
652-
}
653-
654-
@keyframes appear {
655-
0% {
656-
opacity: 0;
657-
transform: translateY(10%);
658-
}
659-
660-
100% {
661-
opacity: 1;
662-
transform: translateY(0%);
663-
}
664-
}
665-
666636
/* Mozilla VPN Controller UI in Container Management Panel */
667637

668-
.moz-vpn-content,
669638
.moz-vpn-controller-content {
670639
display: flex;
671640
position: relative;
@@ -1053,7 +1022,6 @@ input.proxies {
10531022

10541023
/* Mozilla VPN Server list */
10551024

1056-
.moz-vpn-logo,
10571025
.moz-vpn-logotype {
10581026
color: var(--text-color-primary);
10591027
background-image: var(--logoMozillaVpn);

src/js/popup.js

-26
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,6 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
767767
}
768768
});
769769

770-
const mozillaVpnToutName = "moz-tout-main-panel";
771770
const mozillaVpnPermissionsWarningDotName = "moz-permissions-warning-dot";
772771

773772
let { mozillaVpnHiddenToutsList } = await browser.storage.local.get("mozillaVpnHiddenToutsList");
@@ -776,31 +775,6 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
776775
mozillaVpnHiddenToutsList = [];
777776
}
778777

779-
// Decide whether to show Mozilla VPN tout
780-
const mozVpnTout = document.getElementById("moz-vpn-tout");
781-
const mozillaVpnInstalled = await browser.runtime.sendMessage({ method: "MozillaVPN_getInstallationStatus" });
782-
const mozillaVpnToutShouldBeHidden = mozillaVpnHiddenToutsList.find(tout => tout.name === mozillaVpnToutName);
783-
if (mozillaVpnInstalled || mozillaVpnToutShouldBeHidden) {
784-
mozVpnTout.remove();
785-
}
786-
787-
// Add handlers if tout is visible
788-
const mozVpnDismissTout = document.querySelector(".dismiss-moz-vpn-tout");
789-
if (mozVpnDismissTout) {
790-
Utils.addEnterHandler((mozVpnDismissTout), async() => {
791-
mozVpnTout.remove();
792-
mozillaVpnHiddenToutsList.push({
793-
name: mozillaVpnToutName
794-
});
795-
await browser.storage.local.set({ mozillaVpnHiddenToutsList });
796-
});
797-
798-
Utils.addEnterHandler(document.querySelector("#moz-vpn-learn-more"), () => {
799-
MozillaVPN.handleMozillaCtaClick("mac-main-panel-btn");
800-
window.close();
801-
});
802-
}
803-
804778
// Badge Options icon if both nativeMessaging and/or proxy permissions are disabled
805779
const bothMozillaVpnPermissionsEnabled = await MozillaVPN.bothPermissionsEnabled();
806780
const warningDotShouldBeHidden = mozillaVpnHiddenToutsList.find(tout => tout.name === mozillaVpnPermissionsWarningDotName);

src/popup.html

+1-12
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,7 @@ <h4 class="moz-vpn-logotype vpn-status-container-list display-none">Mozilla VPN
192192
</tr>
193193
</table>
194194
</div>
195-
<div id="moz-vpn-tout" class="moz-vpn-content expanded">
196-
<div class="flx-row button-wrapper">
197-
<h4 class="moz-vpn-logo">Mozilla VPN</h4>
198-
<button class="controller dismiss-moz-vpn-tout" tab-index="0"></button>
199-
</div>
200-
<div class="collapsible-content flx-col controller-collapsible-content">
201-
<div class="flx-row flx-space-between">
202-
<span class="moz-vpn-subtitle" data-i18n-message-id="integrateContainers"></span>
203-
</div>
204-
<button id="moz-vpn-learn-more" class="moz-vpn-cta primary-cta" data-i18n-message-id="getMozillaVpn"></button>
205-
</div>
206-
</div>
195+
207196
<v-padding-hack-footer></v-padding-hack-footer> <!--prevents last container from getting covered up by the 'manage containers button' when list is long-->
208197
<div class="bottom-btn keyboard-nav controller" id="manage-containers-link" tabindex="0" data-i18n-message-id="manageContainers"></div>
209198
</div>

0 commit comments

Comments
 (0)