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

Side by Side Diff: popup.js

Issue 29539848: Noissue - Close popup after opening options page (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Sept. 8, 2017, 7:38 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 | « no previous file | 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 "click", toggleEnabled, false 70 "click", toggleEnabled, false
71 ); 71 );
72 document.getElementById("clickhide").addEventListener( 72 document.getElementById("clickhide").addEventListener(
73 "click", activateClickHide, false 73 "click", activateClickHide, false
74 ); 74 );
75 document.getElementById("clickhide-cancel").addEventListener( 75 document.getElementById("clickhide-cancel").addEventListener(
76 "click", cancelClickHide, false 76 "click", cancelClickHide, false
77 ); 77 );
78 document.getElementById("options").addEventListener("click", () => 78 document.getElementById("options").addEventListener("click", () =>
79 { 79 {
80 ext.showOptions(); 80 ext.showOptions(ext.closePopup);
81 }, false); 81 }, false);
82 82
83 // Set up collapsing of menu items 83 // Set up collapsing of menu items
84 for (let collapser of document.getElementsByClassName("collapse")) 84 for (let collapser of document.getElementsByClassName("collapse"))
85 { 85 {
86 collapser.addEventListener("click", toggleCollapse, false); 86 collapser.addEventListener("click", toggleCollapse, false);
87 if (!Prefs[collapser.dataset.option]) 87 if (!Prefs[collapser.dataset.option])
88 { 88 {
89 document.getElementById( 89 document.getElementById(
90 collapser.dataset.collapsable 90 collapser.dataset.collapsable
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 144
145 function toggleCollapse(event) 145 function toggleCollapse(event)
146 { 146 {
147 let collapser = event.currentTarget; 147 let collapser = event.currentTarget;
148 Prefs[collapser.dataset.option] = !Prefs[collapser.dataset.option]; 148 Prefs[collapser.dataset.option] = !Prefs[collapser.dataset.option];
149 collapser.parentNode.classList.toggle("collapsed"); 149 collapser.parentNode.classList.toggle("collapsed");
150 } 150 }
151 151
152 document.addEventListener("DOMContentLoaded", onLoad, false); 152 document.addEventListener("DOMContentLoaded", onLoad, false);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld