Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: popup.js

Issue 29536764: Issue 5587, 5748 - Use mobile options page on Firefox for Android (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Rebase Created Oct. 4, 2017, 8:18 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « options.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 "click", toggleEnabled, false 115 "click", toggleEnabled, false
116 ); 116 );
117 document.getElementById("clickhide").addEventListener( 117 document.getElementById("clickhide").addEventListener(
118 "click", activateClickHide, false 118 "click", activateClickHide, false
119 ); 119 );
120 document.getElementById("clickhide-cancel").addEventListener( 120 document.getElementById("clickhide-cancel").addEventListener(
121 "click", cancelClickHide, false 121 "click", cancelClickHide, false
122 ); 122 );
123 document.getElementById("options").addEventListener("click", () => 123 document.getElementById("options").addEventListener("click", () =>
124 { 124 {
125 ext.showOptions(window.close); 125 chrome.runtime.sendMessage({type: "app.open", what: "options"});
Manish Jethani 2017/10/04 20:21:47 Since we no longer have require in the popup, we c
126 window.close();
Sebastian Noack 2017/10/04 21:38:49 Did you test whether the message is still received
Manish Jethani 2017/10/04 22:03:51 Yes, this works reliably.
126 }, false); 127 }, false);
127 128
128 // Set up collapsing of menu items 129 // Set up collapsing of menu items
129 for (let collapser of document.getElementsByClassName("collapse")) 130 for (let collapser of document.getElementsByClassName("collapse"))
130 { 131 {
131 collapser.addEventListener("click", toggleCollapse, false); 132 collapser.addEventListener("click", toggleCollapse, false);
132 getPref(collapser.dataset.option, value => 133 getPref(collapser.dataset.option, value =>
133 { 134 {
134 if (value) 135 if (value)
135 { 136 {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 175
175 function toggleCollapse(event) 176 function toggleCollapse(event)
176 { 177 {
177 let collapser = event.currentTarget; 178 let collapser = event.currentTarget;
178 let collapsible = document.getElementById(collapser.dataset.collapsible); 179 let collapsible = document.getElementById(collapser.dataset.collapsible);
179 collapsible.classList.toggle("collapsed"); 180 collapsible.classList.toggle("collapsed");
180 togglePref(collapser.dataset.option); 181 togglePref(collapser.dataset.option);
181 } 182 }
182 183
183 document.addEventListener("DOMContentLoaded", onLoad, false); 184 document.addEventListener("DOMContentLoaded", onLoad, false);
OLDNEW
« no previous file with comments | « options.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld