-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontent.js
More file actions
22 lines (20 loc) · 789 Bytes
/
content.js
File metadata and controls
22 lines (20 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
chrome.storage.local.get('advancedMode', (result) => {
if (result.advancedMode) {
document.documentElement.style.display = "none";
console.log("Page hidden!");
} else {
console.log('Page visible!');
}
})
chrome.runtime.onMessage.addListener((msg) => {
if (msg.action === 'lockTab') {
// document.documentElement.style.display = "none";
const imgURL = chrome.runtime.getURL("assets/RabbitTime.jpeg");
document.documentElement.innerHTML = `
<body style = "margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background: black;">
<img src = "${imgURL}" alt = "Get Back to Work!" style = "max-width: 100%; height: auto;" />
</body>
`;
// alert(`${productivityInput.value}`);
}
})