Skip to content

Commit

Permalink
style: fix prettier warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
GabeDuarteM authored and GabrielDuarteM-BG committed Nov 18, 2018
1 parent b4406b0 commit 83af18e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions src/options.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
const saveOptions = () => {
const normalAdWaitSeconds: string = (document.getElementById(
"normalAdWaitSeconds",
'normalAdWaitSeconds',
) as HTMLInputElement).value
const videoAdWaitSeconds: string = (document.getElementById(
"videoAdWaitSeconds",
'videoAdWaitSeconds',
) as HTMLInputElement).value
chrome.storage.sync.set(
{
normalAdWaitSeconds: Number(normalAdWaitSeconds) * 1000,
videoAdWaitSeconds: Number(videoAdWaitSeconds) * 1000,
},
() => {
const status = document.getElementById("status") as HTMLElement
status.textContent = "Options saved."
const status = document.getElementById('status') as HTMLElement
status.textContent = 'Options saved.'
setTimeout(() => {
status.innerHTML = " "
status.innerHTML = ' '
}, 1000)
},
)
Expand All @@ -29,17 +29,17 @@ const restoreOptions = () => {
({ normalAdWaitSeconds, videoAdWaitSeconds }) => {
// tslint:disable-next-line:semicolon
;(document.getElementById(
"normalAdWaitSeconds",
'normalAdWaitSeconds',
) as HTMLInputElement).value = `${normalAdWaitSeconds / 1000}`
;(document.getElementById(
"videoAdWaitSeconds",
'videoAdWaitSeconds',
) as HTMLInputElement).value = `${videoAdWaitSeconds / 1000}`
},
)
}

document.addEventListener("DOMContentLoaded", restoreOptions)
;(document.getElementById("save") as HTMLElement).addEventListener(
"click",
document.addEventListener('DOMContentLoaded', restoreOptions)
;(document.getElementById('save') as HTMLElement).addEventListener(
'click',
saveOptions,
)
6 changes: 3 additions & 3 deletions src/youtube-autoclose-ads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ setInterval(() => {
},
({ normalAdWaitSeconds, videoAdWaitSeconds }) => {
const adClose: HTMLElement | null = document.querySelector(
".ytp-ad-overlay-close-container .ytp-ad-overlay-close-button",
'.ytp-ad-overlay-close-container .ytp-ad-overlay-close-button',
)
const videoAdClose: HTMLElement | null = document.querySelector(
".ytp-ad-skip-button-container .ytp-ad-skip-button",
'.ytp-ad-skip-button-container .ytp-ad-skip-button',
)
const videoAdDisplayed: boolean = !!document.querySelector(
".ytp-ad-skip-button-container",
'.ytp-ad-skip-button-container',
)

if (adClose && !adFound) {
Expand Down

0 comments on commit 83af18e

Please sign in to comment.