By a popup I mean the sort that you can get with the <<popup>> and <<autopopup>> macros defined by the following code:
/* Usage: <<autopopup "Pasage Name">> */
Macro.add('autopopup', {
handler : function () {
if (this.args.length === 0) {
return this.error('no passage name specified');
}
var passage = this.args[0];
Dialog.setup(passage, 'popup');
Dialog.wiki(Story.get(passage).processText().trim());
Dialog.open();
}
});
/*Usage: <<popup "Link Name" "Passage Name">> */
Macro.add("popup", {
version : { major: 1, minor: 0, revision: 0 },
handler : function () {
if (this.args.length < 2) {
var errors = [];
if (this.args.length < 1) { errors.push("link text"); }
if (this.args.length < 2) { errors.push("passage name"); }
return this.error("no " + errors.join(" or ") + " specified");
}
var el = document.createElement("a"),
passage = this.args[1],
title;
el.innerHTML = this.args[0];
el.className = "link-internal macro-popup";
el.setAttribute("data-passage", passage);
title = el.textContent;
UI.addClickHandler(el, null, function (evt) {
var dialog = UI.setup(title, "popup");
new Wikifier(dialog, tale.get(passage).processText().trim());
});
this.output.appendChild(el);
}
});
Edit: I tried the image maps suggestion, and it works fine. There is no "Navigate" button or anything, if anybody can show me how to do this please do. If not, at least it works.