-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25da034
commit d0b3f34
Showing
12 changed files
with
66 additions
and
40 deletions.
There are no files selected for viewing
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
async function isServerAvailable(url) { | ||
try { | ||
|
||
const response = await fetch(url, { | ||
method: "POST", | ||
headers: { | ||
"Content-Type": "application/json" | ||
}, | ||
body: JSON.stringify({url: "test"}) | ||
}) | ||
|
||
return response.ok; // true | ||
} catch (error) { | ||
return false; | ||
} | ||
} | ||
|
||
function wait(milliseconds) { | ||
return new Promise(resolve => {setTimeout(resolve, milliseconds)}) | ||
} | ||
|
||
function waitForElements(selector, interval = 500, timeout = 20000) { | ||
return new Promise((resolve) => { | ||
const startTime = Date.now() | ||
|
||
const timer = setInterval(() => { | ||
const elements = document.querySelectorAll(selector) | ||
if (elements.length > 0) { | ||
clearInterval(timer) | ||
resolve(elements) | ||
} else if (Date.now() - startTime > timeout) { | ||
clearInterval(timer) | ||
resolve(null) | ||
} | ||
}, interval) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ension_v2/downloader-chrome/manifest.json → .../Extended/downloader-chrome/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file not shown.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...ension_v1/downloader-chrome/manifest.json → ...sion/Lite/downloader-chrome/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
20 changes: 0 additions & 20 deletions
20
extension/estension_v2/downloader-chrome/content-general.js
This file was deleted.
Oops, something went wrong.
Binary file not shown.