Allow tm-open-window to specify a page title

This commit is contained in:
Jeremy Ruston
2019-07-04 15:59:34 +01:00
parent 3edaa652ee
commit 2a4c60b23d
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -28,6 +28,7 @@ exports.startup = function() {
var refreshHandler,
title = event.param || event.tiddlerTitle,
paramObject = event.paramObject || {},
windowTitle = paramObject.windowTitle || title,
template = paramObject.template || "$:/core/templates/single.tiddler.window",
width = paramObject.width || "700",
height = paramObject.height || "600",
@@ -51,7 +52,7 @@ exports.startup = function() {
// Initialise the document
srcDocument.write("<html><head></head><body class='tc-body tc-single-tiddler-window'></body></html>");
srcDocument.close();
srcDocument.title = title;
srcDocument.title = windowTitle;
srcWindow.addEventListener("beforeunload",function(event) {
delete windows[title];
$tw.wiki.removeEventListener("change",refreshHandler);