Update chrome.js

This commit is contained in:
Namhyeon Go 2021-08-29 08:32:32 +09:00 committed by GitHub
parent f0114e4011
commit d6c578dca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -385,13 +385,19 @@ var ChromeObject = function() {
}
// get current title
this.title = this.getTitle();
var _title = this.getTitle();
// will be change title
title = this.title + " " + this.pageId.substring(0, 6);
// if not focused
if (_title.indexOf(this.pageId.substring(0, 6)) < 0) {
// save previous title
this.title = _title;
// change webpage title for focusing window
this.setTitle(title);
// will be change title
title = this.title + " " + this.pageId.substring(0, 6);
// change webpage title for focusing window
this.setTitle(title);
}
// find window by title
var pageList = this.getPageList();
@ -406,7 +412,6 @@ var ChromeObject = function() {
return title;
};
this.blur = function() {
return this.setTitle(this.title);
};