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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 let url; | 209 let url; |
210 try | 210 try |
211 { | 211 { |
212 url = new URL(params.homepage); | 212 url = new URL(params.homepage); |
213 } | 213 } |
214 catch (e) | 214 catch (e) |
215 { | 215 { |
216 url = null; | 216 url = null; |
217 } | 217 } |
218 | 218 |
219 if (url && (url.protocol == "http" || url.protocol == "https")) | 219 if (url && (url.protocol == "http:" || url.protocol == "https:")) |
220 subscription.homepage = url.href; | 220 subscription.homepage = url.href; |
221 } | 221 } |
222 | 222 |
223 if (params.title) | 223 if (params.title) |
224 { | 224 { |
225 subscription.title = params.title; | 225 subscription.title = params.title; |
226 subscription.fixedTitle = true; | 226 subscription.fixedTitle = true; |
227 } | 227 } |
228 else | 228 else |
229 subscription.fixedTitle = false; | 229 subscription.fixedTitle = false; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 let data = "[Adblock]\n" + subscription.filters.map((f) => f.text).j
oin("\n"); | 315 let data = "[Adblock]\n" + subscription.filters.map((f) => f.text).j
oin("\n"); |
316 redirectCallback("data:text/plain," + encodeURIComponent(data)); | 316 redirectCallback("data:text/plain," + encodeURIComponent(data)); |
317 } | 317 } |
318 }, false); | 318 }, false); |
319 request.send(null); | 319 request.send(null); |
320 } | 320 } |
321 } | 321 } |
322 }, | 322 }, |
323 }; | 323 }; |
324 Synchronizer.init(); | 324 Synchronizer.init(); |
OLD | NEW |