Skip to content

Instantly share code, notes, and snippets.

@codaroma
Last active June 27, 2025 03:14
Show Gist options
  • Select an option

  • Save codaroma/e7b37d0d0125f4d5234ebc7b289018a7 to your computer and use it in GitHub Desktop.

Select an option

Save codaroma/e7b37d0d0125f4d5234ebc7b289018a7 to your computer and use it in GitHub Desktop.
decode_hub_v2.js
(async () => {
if (!g_form) return;
const map = {
sys_hub_action_instance_v2: "values",
sys_hub_flow_logic_instance_v2: "values",
sys_hub_sub_flow_instance_v2: "subflow_inputs",
sys_hub_trigger_instance_v2: "trigger_inputs",
sys_flow_context_inputs_chunk: "data",
};
const table = g_form.getTableName();
if (!table in map) return;
const value = g_form.getValue(map[table]);
if (!value) return;
window.open(
URL.createObjectURL(
new Blob(
[
await new Response(
new Blob([
Uint8Array.from(atob(value), (c) => c.charCodeAt(0))
.buffer,
])
.stream()
.pipeThrough(new DecompressionStream("gzip"))
).blob(),
],
{ type: "application/json" }
)
)
);
})();
(async()=>{if(!g_form)return;const map={sys_hub_action_instance_v2:"values",sys_hub_flow_logic_instance_v2:"values",sys_hub_sub_flow_instance_v2:"subflow_inputs",sys_hub_trigger_instance_v2:"trigger_inputs",sys_flow_context_inputs_chunk:"data",};const table=g_form.getTableName();if(!table in map)return;const value=g_form.getValue(map[table]);if(!value)return;window.open(URL.createObjectURL(new Blob([await new Response(new Blob([Uint8Array.from(atob(value),(c)=>c.charCodeAt(0)).buffer,]).stream().pipeThrough(new DecompressionStream("gzip"))).blob(),],{type:"application/json"})))})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment