mirror of
https://github.com/bellingcat/auto-archiver-extension.git
synced 2026-06-13 05:58:34 +03:00
Initial commit
This commit is contained in:
16
source/content.js
Normal file
16
source/content.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import optionsStorage from './options-storage.js';
|
||||
|
||||
console.log('💈 Content script loaded for', chrome.runtime.getManifest().name);
|
||||
async function init() {
|
||||
const options = await optionsStorage.getAll();
|
||||
const color = 'rgb(' + options.colorRed + ', ' + options.colorGreen + ',' + options.colorBlue + ')';
|
||||
const text = options.text;
|
||||
const notice = document.createElement('div');
|
||||
notice.innerHTML = text;
|
||||
document.body.prepend(notice);
|
||||
notice.id = 'text-notice';
|
||||
notice.style.border = '2px solid ' + color;
|
||||
notice.style.color = color;
|
||||
}
|
||||
|
||||
init();
|
||||
Reference in New Issue
Block a user