| LEFT | RIGHT |
| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 let params = { | 154 let params = { |
| 155 redirect: null, | 155 redirect: null, |
| 156 homepage: null, | 156 homepage: null, |
| 157 title: null, | 157 title: null, |
| 158 version: null, | 158 version: null, |
| 159 expires: null | 159 expires: null |
| 160 }; | 160 }; |
| 161 for (let i = 1; i < lines.length; i++) | 161 for (let i = 1; i < lines.length; i++) |
| 162 { | 162 { |
| 163 let match = /^\s*!\s*([^:]*[^:\s])\s*:\s*(.*)/.exec(lines[i]); | 163 let match = /^\s*!\s*(.*?)\s*:\s*(.*)/.exec(lines[i]); |
| 164 if (!match) | 164 if (!match) |
| 165 break; | 165 break; |
| 166 | 166 |
| 167 let keyword = match[1].toLowerCase(); | 167 let keyword = match[1].toLowerCase(); |
| 168 if (params.hasOwnProperty(keyword)) | 168 if (params.hasOwnProperty(keyword)) |
| 169 { | 169 { |
| 170 params[keyword] = match[2]; | 170 params[keyword] = match[2]; |
| 171 lines.splice(i--, 1); | 171 lines.splice(i--, 1); |
| 172 } | 172 } |
| 173 } | 173 } |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 } | 338 } |
| 339 | 339 |
| 340 /** | 340 /** |
| 341 * This object is responsible for downloading filter subscriptions whenever | 341 * This object is responsible for downloading filter subscriptions whenever |
| 342 * necessary. | 342 * necessary. |
| 343 * @type {Synchronizer} | 343 * @type {Synchronizer} |
| 344 */ | 344 */ |
| 345 let synchronizer = new Synchronizer(); | 345 let synchronizer = new Synchronizer(); |
| 346 | 346 |
| 347 exports.Synchronizer = synchronizer; | 347 exports.Synchronizer = synchronizer; |
| LEFT | RIGHT |