您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Swap the street and number in the address fields.
// ==UserScript== // @name Geni Swap Street Number // @namespace [email protected] // @version 1.3 // @description Swap the street and number in the address fields. // @author Tommi Rautava // @license CC0-1.0 // @match https://www.geni.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=geni.com // @grant none // ==/UserScript== let elementIds = [ "baptism_location_street_address1", "birth_location_street_address1", "burial_location_street_address1", "current_residence_street_address1", "death_location_street_address1", "location_street_address1", ]; let regex = /^(\d+)\s+(.+)\s*$/; const { get, set } = Object.getOwnPropertyDescriptor( HTMLInputElement.prototype, "value" ); (function () { "use strict"; elementIds.forEach(function (element) { let input = document.querySelector('input[id="' + element + '"]'); if (input) { Object.defineProperty(input, "value", { get() { return get.call(this); }, set(newValue) { let result = newValue.match(regex); if (result) { newValue = result[2] + " " + result[1]; } return set.call(this, newValue); }, }); } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址