The .user.js scripts in this folder can be added to the web browser using the Tampermonkey extension.
Tampermonkey is available from their homepage (tampermonkey.net).
peeringdb-cp-consolidated-tools.user.js, peeringdb-fp-consolidated-tools.user.js, and
peeringdb-deskpro-tools.user.js are generated from a same-named .src.js source plus
lib/admincom-common.js (shared gated debug logging and a retry/backoff request wrapper, identical
across the three scripts). Edit the .src.js file or lib/admincom-common.js, then regenerate:
$ python user.js/scripts/build_userscripts.py # regenerate
$ python user.js/scripts/build_userscripts.py --check # verify (CI)Do not hand-edit the GENERATED BLOCK inside a .user.js file directly — it will be overwritten on
the next regeneration.
lib/admincom-common.js provides:
isDebugEnabled()/dbg/dbgInfo/dbgWarn/dbgGroup/dbgGroupEnd— gated console logging. Toggle via each script's "Debug Mode" Tampermonkey menu command, or directly withlocalStorage.setItem('pdbAdmincom.debug', '1')(CP and FP share this key since both run on thepeeringdb.comorigin; DeskPro's is isolated to its own origin).fetchWithRetry/gmRequestWithRetry— timeout + exponential backoff +Retry-Afterheader handling for same-originfetchand cross-originGM_xmlhttpRequestcalls respectively. FP has no HTTP call sites today, so it only uses the debug-logging half of the lib.
Each script has a matching .meta.js file for lightweight update checks.
Script versioning follows:
major.minor.bugfix
(Older versions used a trailing .YYYYMMDD date segment — retired going forward. When bumping a
script still on the old scheme, don't just drop the date segment: Tampermonkey compares versions
segment-by-segment, so 1.7.2 reads as older than 1.7.2.20260525. Bump the bugfix number
instead, e.g. 1.7.2.20260525 → 1.7.3.)
@updateURLpoints to the script's.meta.jsfile@downloadURLpoints to the script's.user.jsfile@supportURLpoints to:https://github.com/peeringdb/admincom/issues
All update and download URLs use this base path:
https://raw.githubusercontent.com/peeringdb/admincom/master/user.js/
Footnote: Scripts can be installed directly from GitHub after this script has been installed.
All legacy Control Panel (peeringdb-cp-*) scripts have been consolidated into one modular userscript:
peeringdb-cp-consolidated-tools.user.jspeeringdb-cp-consolidated-tools.meta.js
The consolidated script is scoped to https://www.peeringdb.com/cp/peeringdb_server/*/*/change/* and uses strict route guards so only relevant module behavior runs on matching pages.
All legacy Frontend (peeringdb-fp-*) scripts have been consolidated into one modular userscript:
peeringdb-fp-consolidated-tools.user.jspeeringdb-fp-consolidated-tools.meta.js
Both consolidated scripts support disabling specific modules with localStorage.
- CP key:
pdbCpConsolidated.disabledModules - FP key:
pdbFpConsolidated.disabledModules
Both scripts support trust-based User-Agent generation:
Trust-Based Logic:
- Trusted domains (peeringdb.com, *.peeringdb.com, api.peeringdb.com, 127.0.0.1, localhost): Full-detail UA including browser platform, session UUID, e.g.
PeeringDB-Admincom-CP-Consolidated (Windows NT 10.0 uuid/123abc...) - Untrusted domains (other origins in extension requests): Privacy-preserving UA with 16-char Client Fingerprint (deterministic hash of browser attributes) + session UUID, e.g.
PeeringDB-Admincom-CP-Consolidated (fingerprint/a3f2c8e1d4b6f9a2 uuid/123abc...)
Storage Keys:
- CP User-Agent key:
pdbCpConsolidated.userAgent(localStorage) - FP User-Agent key:
pdbFpConsolidated.userAgent(localStorage) - CP Session UUID key:
pdbCpConsolidated.sessionUuid(sessionStorage) - FP Session UUID key:
pdbFpConsolidated.sessionUuid(sessionStorage)
Default behavior (no localStorage override):
- Scripts auto-compute trust-based UA on each request based on target domain
- Session UUID is generated once per session and persisted in
sessionStorage - Client Fingerprint is computed deterministically from browser attributes (userAgent, platform, language, hardwareConcurrency, deviceMemory)
Optional localStorage override:
- CP custom User-Agent:
pdbCpConsolidated.userAgent - FP custom User-Agent:
pdbFpConsolidated.userAgent - When set, overrides auto-computed trust-based UA
Values can be either:
- JSON array:
"[\"module-a\",\"module-b\"]" - Comma-separated string:
"module-a,module-b"
Disable one CP module:
localStorage.setItem("pdbCpConsolidated.disabledModules", '["reset-network-information"]');Disable multiple FP modules:
localStorage.setItem("pdbFpConsolidated.disabledModules", "copy-user-roles,admin-console-link");Re-enable all modules:
localStorage.removeItem("pdbCpConsolidated.disabledModules");
localStorage.removeItem("pdbFpConsolidated.disabledModules");Inspect auto-computed CP User-Agent (trust-based, no override):
console.log("Session UUID:", window.sessionStorage?.getItem("pdbCpConsolidated.sessionUuid"));
console.log("CPU configured?:", !!localStorage.getItem("pdbCpConsolidated.userAgent"));Set custom CP request User-Agent (overrides auto-computed):
localStorage.setItem("pdbCpConsolidated.userAgent", "PeeringDB-Admincom/CP-RDAP (+tampermonkey)");Set custom FP request User-Agent:
localStorage.setItem("pdbFpConsolidated.userAgent", "PeeringDB-Admincom/FP (+custom)");Reset CP/FP User-Agent to auto-computed (trust-based logic):
localStorage.removeItem("pdbCpConsolidated.userAgent");
localStorage.removeItem("pdbFpConsolidated.userAgent");After updating flags, reload the page so modules are re-evaluated.
Note: User-Agent (whether auto-computed or overridden) applies to script-originated extension requests only (for example RDAP lookups in CP). It does not change normal browser navigation/request User-Agent. FP currently has no extension request paths; UA scaffolding is pre-wired for future use.
Use these module IDs with the CP/FP disabledModules keys.
copy-frontend-urlsfacility-google-mapsentity-website-new-tabhighlight-dummy-org-childfrontend-linkssearch-user-email-by-usernameset-network-name-equal-org-namereset-network-informationset-window-title
localStorage.setItem("pdbCpConsolidated.disabledModules", '["copy-frontend-urls"]');
localStorage.setItem("pdbCpConsolidated.disabledModules", '["facility-google-maps"]');
localStorage.setItem("pdbCpConsolidated.disabledModules", '["entity-website-new-tab"]');
localStorage.setItem("pdbCpConsolidated.disabledModules", '["highlight-dummy-org-child"]');
localStorage.setItem("pdbCpConsolidated.disabledModules", '["frontend-links"]');
localStorage.setItem("pdbCpConsolidated.disabledModules", '["search-user-email-by-username"]');
localStorage.setItem("pdbCpConsolidated.disabledModules", '["set-network-name-equal-org-name"]');
localStorage.setItem("pdbCpConsolidated.disabledModules", '["reset-network-information"]');
localStorage.setItem("pdbCpConsolidated.disabledModules", '["set-window-title"]');fix-double-slashesset-window-titleadmin-console-linkcopy-record-datacopy-user-roles
localStorage.setItem("pdbFpConsolidated.disabledModules", '["fix-double-slashes"]');
localStorage.setItem("pdbFpConsolidated.disabledModules", '["set-window-title"]');
localStorage.setItem("pdbFpConsolidated.disabledModules", '["admin-console-link"]');
localStorage.setItem("pdbFpConsolidated.disabledModules", '["copy-record-data"]');
localStorage.setItem("pdbFpConsolidated.disabledModules", '["copy-user-roles"]');These one-liners disable every other known module, leaving only the listed module(s) enabled.
Enable only reset-network-information in CP:
localStorage.setItem("pdbCpConsolidated.disabledModules", JSON.stringify(["copy-frontend-urls","facility-google-maps","entity-website-new-tab","highlight-dummy-org-child","frontend-links","search-user-email-by-username","set-network-name-equal-org-name","set-window-title"]));Enable only admin-console-link in FP:
localStorage.setItem("pdbFpConsolidated.disabledModules", JSON.stringify(["fix-double-slashes","set-window-title","copy-record-data","copy-user-roles"]));Enable only admin-console-link and copy-record-data in FP:
localStorage.setItem("pdbFpConsolidated.disabledModules", JSON.stringify(["fix-double-slashes","set-window-title","copy-user-roles"]));Set enabled to the module IDs you want active; each helper computes and stores all other known modules as disabled.
CP generic helper:
(() => { const all = ["copy-frontend-urls","facility-google-maps","entity-website-new-tab","highlight-dummy-org-child","frontend-links","search-user-email-by-username","set-network-name-equal-org-name","reset-network-information","set-window-title"]; const enabled = ["reset-network-information"]; localStorage.setItem("pdbCpConsolidated.disabledModules", JSON.stringify(all.filter((id) => !enabled.includes(id)))); })();FP generic helper:
(() => { const all = ["fix-double-slashes","set-window-title","admin-console-link","copy-record-data","copy-user-roles"]; const enabled = ["admin-console-link"]; localStorage.setItem("pdbFpConsolidated.disabledModules", JSON.stringify(all.filter((id) => !enabled.includes(id)))); })();The following legacy CP scripts are now deprecation stubs and only log a console message pointing to the consolidated script:
peeringdb-cp-add-facility-address-search-to-google-maps.user.jspeeringdb-cp-admin-console-set-link-target-blank-for-entity-website.user.jspeeringdb-cp-control-panel-hightlight-dummy-organization-child-object.user.jspeeringdb-cp-frontpage-link-on-admin-console.user.jspeeringdb-cp-reset-all-network-information.user.jspeeringdb-cp-search-user-e-mail-addresses-from-username.user.jspeeringdb-cp-set-network-name-equal-to-organisation-name.user.js
The following legacy FP scripts are now deprecation stubs:
peeringdb-fp-admin-console-link-on-frontpage.user.jspeeringdb-fp-copy-record-to-clipboard.user.jspeeringdb-fp-copy-user-role-list.user.jspeeringdb-fp-replace-double-slashes-in-uri.user.jspeeringdb-fp-set-window-title.user.js
Each legacy .meta.js remains in place and version-synced to support update checks and explicit migration.