Index: lib/url.js |
=================================================================== |
--- a/lib/url.js |
+++ b/lib/url.js |
@@ -1,6 +1,6 @@ |
/* |
* This file is part of Adblock Plus <https://adblockplus.org/>, |
- * Copyright (C) 2006-2016 Eyeo GmbH |
+ * Copyright (C) 2006-2017 eyeo GmbH |
* |
* Adblock Plus is free software: you can redistribute it and/or modify |
* it under the terms of the GNU General Public License version 3 as |
@@ -32,7 +32,7 @@ |
*/ |
exports.getDecodedHostname = url => |
{ |
- let hostname = url.hostname; |
+ let {hostname} = url; |
if (hostname.indexOf("xn--") == -1) |
return hostname; |
@@ -69,12 +69,11 @@ |
*/ |
exports.stringifyURL = url => |
{ |
- let protocol = url.protocol; |
- let href = url.href; |
+ let {protocol, href} = url; |
if (protocol == "http:" || protocol == "https:") |
{ |
- let hostname = url.hostname; |
+ let {hostname} = url; |
if (hostname.indexOf("xn--") != -1) |
href = href.replace(hostname, punycode.toUnicode(hostname)); |