google-search-supported-domains

Exposes the list of Google Search’s supported domains as the constant “SUPPORTED_DOMAINS”.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/492742/1361711/google-search-supported-domains.js

// ==UserScript==
// @name               google-search-supported-domains
// @description        Exposes the list of Google Search’s supported domains as the constant “SUPPORTED_DOMAINS”.
// @author             Jason Kwok
// @namespace          https://jasonhk.dev/
// @version            1.0.0
// @license            MIT
// ==/UserScript==

if (location.href !== "https://www.google.com/supported_domains")
{
    throw new Error("Invalid URL.");
}

const SUPPORTED_DOMAINS = document.body.textContent.trim().split("\n");