1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-15 23:07:18 +00:00

Make "tc-dirty" update also on external windows (#5129)

* Update windows.js

* Update saver-handler.js

* Update saver-handler.js
This commit is contained in:
Simon Huber
2020-11-28 22:24:01 +01:00
committed by GitHub
parent b3cbd7d733
commit eb7f59a855
2 changed files with 8 additions and 4 deletions

View File

@@ -197,8 +197,12 @@ SaverHandler.prototype.isDirty = function() {
Update the document body with the class "tc-dirty" if the wiki has unsaved/unsynced changes
*/
SaverHandler.prototype.updateDirtyStatus = function() {
var self = this;
if($tw.browser) {
$tw.utils.toggleClass(document.body,"tc-dirty",this.isDirty());
$tw.utils.each($tw.windows,function(win) {
$tw.utils.toggleClass(win.document.body,"tc-dirty",self.isDirty());
});
}
};