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

Delta Between Two Patch Sets: lib/elemHideStylesheet.js

Issue 29345667: Issue 4139 - Don't save element hiding filters on disk (Closed)
Left Patch Set: Created June 8, 2016, 8:27 p.m.
Right Patch Set: Rebased and updated dependency Created June 17, 2016, 12:10 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « lib/child/elemHide.js ('k') | lib/main.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 { 63 {
64 onUpdate.inProgress = false; 64 onUpdate.inProgress = false;
65 apply(); 65 apply();
66 }); 66 });
67 } 67 }
68 68
69 function apply() 69 function apply()
70 { 70 {
71 unapply(); 71 unapply();
72 72
73 if (!Prefs.enabled)
74 return;
75
73 try 76 try
74 { 77 {
75 Utils.styleService.loadAndRegisterSheet(styleURL, 78 Utils.styleService.loadAndRegisterSheet(styleURL,
76 Ci.nsIStyleSheetService.USER_SHEET); 79 Ci.nsIStyleSheetService.USER_SHEET);
77 applied = true; 80 applied = true;
78 } 81 }
79 catch (e) 82 catch (e)
80 { 83 {
81 Cu.reportError(e); 84 Cu.reportError(e);
82 } 85 }
(...skipping 12 matching lines...) Expand all
95 { 98 {
96 Cu.reportError(e); 99 Cu.reportError(e);
97 } 100 }
98 applied = false; 101 applied = false;
99 } 102 }
100 } 103 }
101 104
102 // Send dummy message before initializing, this delay makes sure that the child 105 // Send dummy message before initializing, this delay makes sure that the child
103 // modules are loaded and our protocol handler registered. 106 // modules are loaded and our protocol handler registered.
104 port.emitWithResponse("ping").then(init); 107 port.emitWithResponse("ping").then(init);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld