-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcontent_script.js
More file actions
18 lines (18 loc) · 639 Bytes
/
content_script.js
File metadata and controls
18 lines (18 loc) · 639 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
chrome.storage.sync.get(
{ instance: 'cobalt.tools', auto: true },
(items) => {
const u = new URLSearchParams(window.location.search).get('u');
if(location.host === items.instance && items.auto && u) {
let int = setInterval(() => {
let urlInput = document.getElementById('url-input-area');
if(urlInput.value) {
clearInterval(int);
let btn = document.getElementById('download-button');
if(btn) {
btn.click();
}
}
}, 100);
}
}
);