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