From 4122a9017554e37c565715c7aaa7f0bca58c6ed7 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Tue, 17 Jun 2014 10:11:10 +0100 Subject: [PATCH] Indicate changes in title tag via * flag --- editor.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/editor.php b/editor.php index 88c81aa..003e57b 100644 --- a/editor.php +++ b/editor.php @@ -275,6 +275,18 @@ function createNewCMInstance(num) { // Do the pesticide plugin if it exists try {top.ICEcoder.doPesticide();} catch(err) {}; } + // Update the title tag to indicate any changes + if (!top.ICEcoder.loadingFile) { + var winTitle = "ICEcoder v "+top.ICEcoder.versionNo; + for(var i=1;i<=top.ICEcoder.savedPoints.length;i++) { + if (top.ICEcoder.savedPoints[i-1]!=top.ICEcoder.getcMInstance(top.ICEcoder.cMInstances[i-1]).changeGeneration()) { + // We have an unsaved tab, indicate that in the title + winTitle += " *"; + break; + } + } + top.document.title = winTitle; + } } );