1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 var servicesDiv = document.getElementById("webservices-container");
6 servicesDiv.style.display = "none";
8 function showServices() {
9 servicesDiv.style.display = "";
12 // Fluent replaces the children of the element being overlayed which prevents us
13 // from putting an event handler directly on the children.
15 document.querySelector("[data-l10n-id=rights-intro-point-5]") ||
16 document.querySelector("[data-l10n-id=rights-intro-point-5-unbranded]");
17 rightsIntro.addEventListener("click", event => {
18 if (event.target.id == "showWebServices") {
23 var disablingServicesDiv = document.getElementById(
24 "disabling-webservices-container"
27 function showDisablingServices() {
28 disablingServicesDiv.style.display = "";
31 if (disablingServicesDiv != null) {
32 disablingServicesDiv.style.display = "none";
33 // Same issue here with Fluent replacing the children affecting the event listeners.
34 let rightsWebServices = document.querySelector(
35 "[data-l10n-id=rights-webservices]"
37 rightsWebServices.addEventListener("click", event => {
38 if (event.target.id == "showDisablingWebServices") {
39 showDisablingServices();