Skip to content
Snippets Groups Projects
Verified Commit c92c3b8a authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Add a JS helper function to parse JSON script tags created by json_script

parent 1a510da3
No related branches found
No related tags found
1 merge request!136Add a JS helper function to parse JSON script tags created by json_script
Pipeline #717 failed
...@@ -24,4 +24,7 @@ function getNowFormatted() { ...@@ -24,4 +24,7 @@ function getNowFormatted() {
return formatDate(getNow()); return formatDate(getNow());
} }
function getJSONScript(elementId) {
return JSON.parse(document.getElementById(elementId).textContent);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment