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

Delta Between Two Patch Sets: popup.js

Issue 29536764: Issue 5587, 5748 - Use mobile options page on Firefox for Android (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Left Patch Set: Pass boolean instead of object Created Sept. 8, 2017, 12:50 p.m.
Right Patch Set: Remove workaround for FOUC issue and update adblockplusui dependency Created Oct. 5, 2017, 1:24 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« options.js ('K') | « options.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
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"});
126 window.close();
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);
LEFTRIGHT
« options.js ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld