Add js_action.yaml

This commit is contained in:
Hang Cui
2025-10-22 15:40:45 -07:00
parent b09b3e038f
commit a36f405466
526 changed files with 191767 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
export function getUserAgent() {
if (typeof navigator === "object" && "userAgent" in navigator) {
return navigator.userAgent;
}
if (typeof process === "object" && process.version !== undefined) {
return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
}
return "<environment undetectable>";
}