mirror of
https://github.com/alexadam/save-as-ebook.git
synced 2025-09-10 17:34:47 +00:00
add tests - WIP
This commit is contained in:
parent
612a62ecac
commit
467962e565
8 changed files with 373 additions and 0 deletions
|
@ -1,3 +1,34 @@
|
|||
|
||||
///////////////////
|
||||
///////////////////
|
||||
///////////////////
|
||||
///////////////////
|
||||
/// Only for testing
|
||||
|
||||
chrome.runtime.onInstalled.addListener(details => {
|
||||
if (navigator.userAgent === 'PuppeteerTestingAgent') {
|
||||
let TEST_TIMER = null
|
||||
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
|
||||
if (TEST_TIMER) {
|
||||
clearTimeout(TEST_TIMER)
|
||||
}
|
||||
|
||||
TEST_TIMER = setTimeout(()=> {
|
||||
executeCommand({type: 'save-page'})
|
||||
}, 2000)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
///////////////////
|
||||
///////////////////
|
||||
///////////////////
|
||||
///////////////////
|
||||
|
||||
|
||||
|
||||
var isBusy = false;
|
||||
|
||||
var defaultStyles = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue