Left: | ||
Right: |
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-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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
310 if (filter instanceof CommentFilter && this.GROUPTITLE_REGEXP.test(filte r.text)) | 310 if (filter instanceof CommentFilter && this.GROUPTITLE_REGEXP.test(filte r.text)) |
311 continue; | 311 continue; |
312 list.push(filter.text); | 312 list.push(filter.text); |
313 | 313 |
314 if (filter instanceof ElemHideException && Services.vc.compare(minVersio n, "2.1") < 0) | 314 if (filter instanceof ElemHideException && Services.vc.compare(minVersio n, "2.1") < 0) |
315 minVersion = "2.1"; | 315 minVersion = "2.1"; |
316 | 316 |
317 if (filter instanceof RegExpFilter && filter.contentType & (RegExpFilter .typeMap.GENERICHIDE | RegExpFilter.typeMap.GENERICBLOCK) && Services.vc.compare (minVersion, "2.6.12") < 0) | 317 if (filter instanceof RegExpFilter && filter.contentType & (RegExpFilter .typeMap.GENERICHIDE | RegExpFilter.typeMap.GENERICBLOCK) && Services.vc.compare (minVersion, "2.6.12") < 0) |
318 minVersion = "2.6.12"; | 318 minVersion = "2.6.12"; |
319 | 319 |
320 if (filter instanceof ElemHideEmulationFilter && Services.vc.compare(min Version, "2.7.3") < 0) | |
321 minVersion = "2.7.3"; | |
322 | |
320 if (filter instanceof RegExpFilter && | 323 if (filter instanceof RegExpFilter && |
321 (filter.contentType & RegExpFilter.typeMap.WEBSOCKET) && | 324 (filter.contentType & RegExpFilter.typeMap.WEBSOCKET) && |
322 Services.vc.compare(minVersion, "2.8")) | 325 Services.vc.compare(minVersion, "2.8")) |
323 { | 326 { |
324 minVersion = "2.8"; | 327 minVersion = "2.8"; |
325 } | 328 } |
326 | |
327 if (filter instanceof ElemHideEmulationFilter && Services.vc.compare(min Version, "2.9") < 0) | |
328 minVersion = "2.9"; | |
Wladimir Palant
2016/12/13 14:44:27
No, as far as our users are concerned the syntax i
Felix Dahlke
2016/12/13 15:55:39
Acknowledged. (Oh boy, sounds like we'll have to r
Wladimir Palant
2016/12/13 16:33:03
No, this feature is purely informative - meaning t
| |
329 } | 329 } |
330 } | 330 } |
331 list.unshift("[Adblock Plus " + minVersion + "]"); | 331 list.unshift("[Adblock Plus " + minVersion + "]"); |
332 | 332 |
333 // Insert checksum. Have to add an empty line to the end of the list to | 333 // Insert checksum. Have to add an empty line to the end of the list to |
334 // account for the trailing newline in the file. | 334 // account for the trailing newline in the file. |
335 list.push(""); | 335 list.push(""); |
336 let checksum = Utils.generateChecksum(list); | 336 let checksum = Utils.generateChecksum(list); |
337 list.pop(); | 337 list.pop(); |
338 if (checksum) | 338 if (checksum) |
339 list.splice(1, 0, "! Checksum: " + checksum); | 339 list.splice(1, 0, "! Checksum: " + checksum); |
340 | 340 |
341 IO.writeToFile(file, list, function(e) | 341 IO.writeToFile(file, list, function(e) |
342 { | 342 { |
343 if (e) | 343 if (e) |
344 { | 344 { |
345 Cu.reportError(e); | 345 Cu.reportError(e); |
346 Utils.alert(window, E("backupButton").getAttribute("_backupError"), E("b ackupButton").getAttribute("_backupDialogTitle")); | 346 Utils.alert(window, E("backupButton").getAttribute("_backupError"), E("b ackupButton").getAttribute("_backupDialogTitle")); |
347 } | 347 } |
348 }); | 348 }); |
349 } | 349 } |
350 }; | 350 }; |
351 | 351 |
352 window.addEventListener("load", function() | 352 window.addEventListener("load", function() |
353 { | 353 { |
354 Backup.init(); | 354 Backup.init(); |
355 }, false); | 355 }, false); |
LEFT | RIGHT |