Indicate changes in title tag via * flag

This commit is contained in:
Matt Pass
2014-06-17 10:11:10 +01:00
parent 823c2c1b5f
commit 4122a90175

View File

@@ -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;
}
}
);