Skip to content

Commit

Permalink
startup -- append metadata for html
Browse files Browse the repository at this point in the history
  • Loading branch information
SharkPool-SP authored Jan 14, 2025
1 parent 7434f6f commit e2bea40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,14 @@ function showMediaEditor(namespace, fileType) {
});
} else if (fileType === "html") {
const iframe = editor.querySelector(`div[class="media-holder"] iframe`);
media.d = media.d.split(",")[1];
const ogHTML = media.d.split(",")[1];

editor.querySelector(`div[class="selector-ui"] select`).addEventListener("change", (e) => {
const children = allCheckers[0].children;
children[0].style.display = "none";
children[1].style.display = "";
const value = JSON.parse(e.target.value);
media.d = btoa(`<!-- CS META: ${value[0]},${value[1]} -->`) + ogHTML;
iframe.style.width = value[0];
iframe.style.height = value[1];

Expand Down

0 comments on commit e2bea40

Please sign in to comment.