| OLD | NEW |
| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 { | 59 { |
| 60 var parts = params[i].split("=", 2); | 60 var parts = params[i].split("=", 2); |
| 61 if (parts.length == 2 && parts[0] in data) | 61 if (parts.length == 2 && parts[0] in data) |
| 62 data[parts[0]] = decodeURIComponent(parts[1]); | 62 data[parts[0]] = decodeURIComponent(parts[1]); |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 | 66 |
| 67 var params = { | 67 var params = { |
| 68 blockedURLs: "", | 68 blockedURLs: "", |
| 69 seenDataCorruption: false, | |
| 70 filterlistsReinitialized: false, | 69 filterlistsReinitialized: false, |
| 71 addSubscription: false, | 70 addSubscription: false, |
| 72 filterError: false, | 71 filterError: false, |
| 73 downloadStatus: "synchronize_ok", | 72 downloadStatus: "synchronize_ok", |
| 74 showNotificationUI: false, | 73 showNotificationUI: false, |
| 75 safariContentBlocker: false | 74 safariContentBlocker: false |
| 76 }; | 75 }; |
| 77 updateFromURL(params); | 76 updateFromURL(params); |
| 78 | 77 |
| 79 var modules = {}; | 78 var modules = {}; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 modules.info = { | 328 modules.info = { |
| 330 platform: "gecko", | 329 platform: "gecko", |
| 331 platformVersion: "34.0", | 330 platformVersion: "34.0", |
| 332 application: "firefox", | 331 application: "firefox", |
| 333 applicationVersion: "34.0", | 332 applicationVersion: "34.0", |
| 334 addonName: "adblockplus", | 333 addonName: "adblockplus", |
| 335 addonVersion: "2.6.7" | 334 addonVersion: "2.6.7" |
| 336 }; | 335 }; |
| 337 updateFromURL(modules.info); | 336 updateFromURL(modules.info); |
| 338 | 337 |
| 338 modules.subscriptionInit = { |
| 339 reinitialized: params.filterlistsReinitialized |
| 340 }; |
| 341 |
| 339 global.Services = { | 342 global.Services = { |
| 340 vc: { | 343 vc: { |
| 341 compare: function(v1, v2) | 344 compare: function(v1, v2) |
| 342 { | 345 { |
| 343 return parseFloat(v1) - parseFloat(v2); | 346 return parseFloat(v1) - parseFloat(v2); |
| 344 } | 347 } |
| 345 } | 348 } |
| 346 }; | 349 }; |
| 347 | 350 |
| 348 var filters = [ | 351 var filters = [ |
| (...skipping 24 matching lines...) Expand all Loading... |
| 373 "https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt", | 376 "https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt", |
| 374 "https://easylist-downloads.adblockplus.org/exceptionrules.txt", | 377 "https://easylist-downloads.adblockplus.org/exceptionrules.txt", |
| 375 "https://easylist-downloads.adblockplus.org/fanboy-social.txt", | 378 "https://easylist-downloads.adblockplus.org/fanboy-social.txt", |
| 376 "~user~786254" | 379 "~user~786254" |
| 377 ]; | 380 ]; |
| 378 var knownSubscriptions = Object.create(null); | 381 var knownSubscriptions = Object.create(null); |
| 379 for (var subscriptionUrl of subscriptions) | 382 for (var subscriptionUrl of subscriptions) |
| 380 knownSubscriptions[subscriptionUrl] = modules.subscriptionClasses.Subscripti
on.fromURL(subscriptionUrl); | 383 knownSubscriptions[subscriptionUrl] = modules.subscriptionClasses.Subscripti
on.fromURL(subscriptionUrl); |
| 381 var customSubscription = knownSubscriptions["~user~786254"]; | 384 var customSubscription = knownSubscriptions["~user~786254"]; |
| 382 | 385 |
| 383 global.seenDataCorruption = params.seenDataCorruption; | |
| 384 global.filterlistsReinitialized = params.filterlistsReinitialized; | |
| 385 | |
| 386 if (params.addSubscription) | 386 if (params.addSubscription) |
| 387 { | 387 { |
| 388 // We don't know how long it will take for the page to fully load | 388 // We don't know how long it will take for the page to fully load |
| 389 // so we'll post the message after one second | 389 // so we'll post the message after one second |
| 390 setTimeout(function() | 390 setTimeout(function() |
| 391 { | 391 { |
| 392 window.postMessage({ | 392 window.postMessage({ |
| 393 type: "message", | 393 type: "message", |
| 394 payload: { | 394 payload: { |
| 395 title: "Custom subscription", | 395 title: "Custom subscription", |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 | 480 |
| 481 if (params.safariContentBlocker) | 481 if (params.safariContentBlocker) |
| 482 { | 482 { |
| 483 global.safari = { | 483 global.safari = { |
| 484 extension: { | 484 extension: { |
| 485 setContentBlocker: function() {} | 485 setContentBlocker: function() {} |
| 486 } | 486 } |
| 487 }; | 487 }; |
| 488 } | 488 } |
| 489 })(this); | 489 })(this); |
| OLD | NEW |