Skip to content

Instantly share code, notes, and snippets.

@Delivator
Created November 15, 2025 10:00
Show Gist options
  • Select an option

  • Save Delivator/699bd6c00b7a64849f2aacc58adcde2b to your computer and use it in GitHub Desktop.

Select an option

Save Delivator/699bd6c00b7a64849f2aacc58adcde2b to your computer and use it in GitHub Desktop.
TrueNAS Web-UI autofill username for proton pass
// ==UserScript==
// @name TrueNAS Web-UI autofill username
// @namespace Violentmonkey Scripts
// @match https://harz:4430/*
// @match https://ui.harz.lol/*
// @grant none
// @version 1.0
// @author -
// @description Fix ProtonPass autofill issue with TrueNAS Web-UI
// ==/UserScript==
(function () {
'use strict';
const observer = new MutationObserver(() => {
const usernameElement = document.querySelector("#mat-input-1");
const passwordElement = document.querySelector("#mat-input-2");
if (usernameElement && passwordElement) {
usernameElement.value = "truenas_admin";
usernameElement.dispatchEvent(new Event('input', { bubbles: true })); // Trigger input event to notify the UI
passwordElement.focus();
observer.disconnect(); // Stop observing once the element is found and updated
}
});
observer.observe(document.body, { childList: true, subtree: true });
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment