forked from Stigmatoz/web-activity-time-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebact.js
More file actions
20 lines (17 loc) · 662 Bytes
/
webact.js
File metadata and controls
20 lines (17 loc) · 662 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
window.onload = function () {
var table = document.getElementById('resultTable');
var tabs = chrome.extension.getBackgroundPage().timer.tabs;
for (var i = 0; i < tabs.length; i++) {
var div = document.createElement('div');
div.classList.add('inline-flex');
var img = document.createElement('img');
img.setAttribute('height', 15);
img.setAttribute('src', tabs[i].favicon);
var span = document.createElement('span');
span.innerText = tabs[i].url;
span.classList.add('margin-left-5');
div.appendChild(img);
div.appendChild(span);
table.appendChild(div);
}
};