Scroll to top when open download video

This commit is contained in:
the1812 2019-11-08 17:22:37 +08:00
parent d550447a22
commit 75df3b57d7
10 changed files with 23 additions and 17 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -45,9 +45,9 @@
"download-audio.min.js": "1F4536DE4FF302BFD026CA17E028AF8EB037FB6D0CB355692549DECAEAE0E8C9",
"download-danmaku.min.js": "B254644525ABF064DB770FE986D2AB88063406783EC0538004EFBE0E2B2ACD62",
"download-video-package.min.js": "B10FF11DE7DFBACEC38F195B8E836511E527215B5E177CB1D223D14F30EB1435",
"download-video.min.css": "95FF9DA3C1FFF1C1134D70AE3BB609049B7D5D3FBB71CAAAE84C8742C51AD841",
"download-video.min.css": "3312B63681985C539F6BEEA9135844C0C82F529AE823328AE63C34BFACBD3AE0",
"download-video.min.html": "2727789E8423E8DBC8801FF6AC0D8181AC684A643A83CD446A5D69318DDBF9F6",
"download-video.min.js": "E87FC3A8DA06F312C4EBF42097A1ECA73432853D8254E120EB74BF1EB717E304",
"download-video.min.js": "2485F8AB5A4A4E5E7F40388ACD1657C9ABD1B2279C62BEA4AA3728E80F706C0F",
"dpi-img.vue.min.js": "3D9D93079365DCABA8DC8970F051AD1A7F25C3EFFF850CD1000C4312E9B910DD",
"expand-danmaku.min.js": "B21658C40085AEA8DC49652AE62EB8610BB2EBEAF7A9C9AF69EF3B11E08EEC8D",
"expand-description.min.css": "58C7710A50521B80F7D872BDC4C652610D84C4FABC6874BA66DA37B4F8759224",

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,6 @@
html {
scroll-behavior: smooth;
}
.download-video {
--download-video-background: white;
--download-video-foreground: black;

View File

@ -561,11 +561,14 @@ async function loadPageData() {
async function loadWidget() {
selectedFormat = formats[0]
resources.applyStyle('downloadVideoStyle')
dq('#download-video')!.addEventListener('click', () => {
dq('.download-video')!.classList.toggle('opened');
const button = dq('#download-video') as HTMLElement
button.addEventListener('click', () => {
const panel = dq('.download-video') as HTMLElement
panel.classList.toggle('opened')
window.scroll(0, 0);
(dq('.gui-settings-mask') as HTMLDivElement).click()
})
dq('#download-video')!.addEventListener('mouseover', () => {
button.addEventListener('mouseover', () => {
document.body.insertAdjacentHTML('beforeend', resources.import('downloadVideoHtml'))
loadPanel()
}, { once: true })