2022-07-08 22:12:05 +02:00
|
|
|
import Item from './Item.js';
|
|
|
|
import Log from './Log.js';
|
|
|
|
|
|
|
|
export default class Information {
|
|
|
|
|
|
|
|
static CLASS_NAME = 'midefos-idealista-container';
|
|
|
|
static ITEM_SELECTOR = 'article.item';
|
|
|
|
|
|
|
|
static create() {
|
|
|
|
const items = document.querySelectorAll(this.ITEM_SELECTOR);
|
2022-07-09 13:30:30 +02:00
|
|
|
Log.debug(`Creating information for ${items.length} items...`)
|
|
|
|
for (const itemNode of items) {
|
|
|
|
const item = new Item(itemNode);
|
|
|
|
item.refreshData();
|
2022-07-08 22:12:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|