mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-14 05:31:03 +00:00
Update chrome.js
This commit is contained in:
parent
f0114e4011
commit
d6c578dca3
|
@ -385,13 +385,19 @@ var ChromeObject = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// get current title
|
// get current title
|
||||||
this.title = this.getTitle();
|
var _title = this.getTitle();
|
||||||
|
|
||||||
|
// if not focused
|
||||||
|
if (_title.indexOf(this.pageId.substring(0, 6)) < 0) {
|
||||||
|
// save previous title
|
||||||
|
this.title = _title;
|
||||||
|
|
||||||
// will be change title
|
// will be change title
|
||||||
title = this.title + " " + this.pageId.substring(0, 6);
|
title = this.title + " " + this.pageId.substring(0, 6);
|
||||||
|
|
||||||
// change webpage title for focusing window
|
// change webpage title for focusing window
|
||||||
this.setTitle(title);
|
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);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user