Skip to content

Instantly share code, notes, and snippets.

View OimachiStudio's full-sized avatar

OimachiStudio

View GitHub Profile
This is a sample gist created via browser automation.
@OimachiStudio
OimachiStudio / hubform.js
Created October 2, 2025 12:47
Hubform 2025
// Parse the 'key' parameter along with existing parameters
const getQueryParam = (param) => {
const scripts = document.getElementsByTagName("script");
const src = scripts[scripts.length - 1].src;
return new URLSearchParams(src.split("?")[1]).get(param);
};
const hubspot_portalId = getQueryParam("hubspot_portalId");
const hubspot_region = getQueryParam("hubspot_region") || "eu1";