Exposes the list of Google Search’s supported domains as the constant “SUPPORTED_DOMAINS”.
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-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");