Update chrome.js

This commit is contained in:
Namhyeon Go 2021-06-20 05:52:30 +09:00 committed by GitHub
parent ce4003ec17
commit 8e13c7e219
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,20 +191,20 @@ var ChromeObject = function() {
};
this.getPageById = function(id) {
var pages = pageList.filter(function(x) {
var pages = this.getPageList().filter(function(x) {
return (pageList[k].id = id);
});
return (pages.length > 0 ? pages[0] : null);
};
this.getPagesByUrl = function(url) {
return pageList.filter(function(x) {
return this.getPageList().filter(function(x) {
return (x.url == url);
});
};
this.getPagesByTitle = function(title) {
return pageList.filter(function(x) {
return this.getPageList().filter(function(x) {
return (x.title == title);
});
};