Internet Road Trip: Fix Place Name

Fix place names in Canada (and somewhat better in rural US).

目前為 2025-05-25 提交的版本,檢視 最新版本

// ==UserScript==
// @name        Internet Road Trip: Fix Place Name
// @namespace   crschmidt.net/scripts/fixplacename
// @match       https://neal.fun/*
// @version     0.1.0
// @author      crschmidt
// @run-at      document-start
// @description Fix place names in Canada (and somewhat better in rural US).
// @require     https://cdn.jsdelivr.net/npm/[email protected]
// @license     MIT
// ==/UserScript==
(async function() {

var locationName = function() {
    var parts = [];
    if (this.currentLocation.neighborhood) {
      parts.push(this.currentLocation.neighborhood);
    }
    if (this.currentLocation.state) {
      parts.push(this.currentLocation.state);
    }
    if (this.currentLocation.country != "United States") {
        parts.push(this.currentLocation.country);
    }
    console.log(parts);
    return parts.join(", ");
}
(await IRF.vdom.container).state._computedWatchers.locationName.getter = locationName;
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址