33 lines
721 B
JavaScript
33 lines
721 B
JavaScript
function applyDefaultStyle(element) {
|
|
element.style.position = "fixed";
|
|
element.style.zIndex = 1000;
|
|
}
|
|
|
|
let mCalorieCount = document.createElement("div");
|
|
applyDefaultStyle(mCalorieCount);
|
|
mCalorieCount.style.left = 0;
|
|
mCalorieCount.style.top = 0;
|
|
mCalorieCount.innerHTML = `
|
|
<b>25</b>:<b>23</b>
|
|
<br/>
|
|
<b>883</b> kal
|
|
`;
|
|
document.body.append(mCalorieCount);
|
|
|
|
let mResults = document.createElement("div");
|
|
applyDefaultStyle(mResults);
|
|
mResults.style.right = 0;
|
|
mResults.style.bottom = 0;
|
|
mResults.style.textAlign = "right";
|
|
mResults.innerHTML = `
|
|
5 161<br/>
|
|
10 332<br/>
|
|
15 490<br/>
|
|
20 712<br/>
|
|
25 875<br/>
|
|
`;
|
|
document.body.append(mResults);
|
|
|
|
chrome.storage.sync.get('color', ({color}) => {
|
|
});
|