@h_classen I had a look at your document, but I must confess, I haven't the foggiest idea of what's happening there. I tried inputting my own url but nothing showed up... In all honesty, I don't even know what this means
Sorry.
So, what I thought I would try for this iteration is a combination of @MaxZieb's extension hypeDocument.setInnerHtmlByClass 1.0
hypeDocument.setInnerHtmlByClass = function(cl, content) {
var hypeDiv = document.getElementById(this.documentId());
var hypeElm = hypeDiv.getElementsByClassName(cl);
for(var i=0; i<hypeElm.length; i++){
hypeElm[i].innerHTML=content;
}
}
and @MarkHunte's
function sceneTitleCallback(hypeDocument, element, event) {
hypeDocument.getSymbolInstanceById('sceneNameSymbol').element().children[0].children[0].textContent = hypeDocument.currentSceneName() ;
}
if("HYPE_eventListeners" in window === false) {
window.HYPE_eventListeners = Array();
}
window.HYPE_eventListeners.push({"type":"HypeSceneLoad", "callback":sceneTitleCallback});
So I cobbled together this:
function extendHype(hypeDocument, element, event) {
hypeDocument.PopulateIFrames = function() {
var embeds = document.querySelectorAll('.embed');
for(var i=0; i<embeds.length; i++){
embeds[i].querySelector('iframe').src="http://plughole.com/" + embeds[i].dataset.deck + "ForumExample.html#" + embeds[i].dataset.deck + "_" + embeds[i].dataset.page;
}
}
return true;
}
if("HYPE_eventListeners" in window === false) {
window.HYPE_eventListeners = Array();
}
window.HYPE_eventListeners.push({"type":"HypeSceneLoad", "callback":extendHype});
But I still need to call a function that calls hypeDocument.PopulateIFrames(); on scene load in order for it to work. I thought that the HypeSceneLoad callback would take care of that.