JavaScript Restrictor
Browser extension that improves privacy and security
Loading...
Searching...
No Matches
url.js File Reference

Functions that handles working with URLs. More...

Functions

function extractSubDomains (thisDomain)
 

Detailed Description

Functions that handles working with URLs.

Author
Copyright (C) 2018 Zbynek Cervinka
Copyright (C) 2019 Libor Polcak
Copyright (C) 2019 Martin Timko
License:
SPDX-License-Identifier: GPL-3.0-or-later

Function Documentation

◆ extractSubDomains()

function extractSubDomains (   thisDomain)

Get all sub domains for a domain.

Parameters
thisDomainDomain name string, e.g. www.fit.vutbr.cz IPv4 address, e.g. 147.229.9.23 IPv6 address, e.g. 2001:67c:1220:809::93e5:917
Returns
List of strings representing all subdomains, including TLD. The list starts with the most generic domain and continues with the more and more specific domains. For example, www.fit.vutbr.cz -> [ "cz", "vutbr.cz", "fit.vutbr.cz", "www.fit.vutbr.cz" ]
Here is the caller graph for this function: