diff --git a/lib/Peertube/DL/public/css/index.css b/lib/Peertube/DL/public/css/index.css index c2b3075..70768e5 100644 --- a/lib/Peertube/DL/public/css/index.css +++ b/lib/Peertube/DL/public/css/index.css @@ -133,3 +133,55 @@ h2 { #modal-loading embed { width: 10%; } + +#poping-notice { + display: none; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + border: black 1px solid; + width: 91%; + background: white; + padding: 10px; + border-radius: 15px; + max-height: 100%; + overflow-y: scroll; +} +#poping-notice.active { + display: block; +} + +#poping-notice-container-bar { + display: flex; + justify-content: center; + font-size: 5rem; +} + +#close-poping-notice { + width: 150px; + height: 150px; + align-items: center; + display: flex; + text-align: center; + justify-content: center; + border-radius: 50%; + background: #0f0; + color: black; +} + +#close-poping-notice:hover { + background: black; + color: white; +} + +@media screen and min-width(750px) { + #poping-notice { + width: auto; + height: auto; + } + + #poping-notice-container-bar { + justify-content: right; + } +} diff --git a/lib/Peertube/DL/public/index.html b/lib/Peertube/DL/public/index.html index 29f5cff..021c32e 100644 --- a/lib/Peertube/DL/public/index.html +++ b/lib/Peertube/DL/public/index.html @@ -2,6 +2,7 @@ +
@@ -29,5 +30,20 @@
+
+

This webpage is free as in freedom software, it is offered to you with the hope it will be useful, but without any warranty, + you can find the source code at my gitea under the AGPLv3 license.

+ +

I hope that if you find a non supported url which should be supported, a bug, or a feature you would like this webpage to have you file an issue in + https://gitea.sergiotarxz.freemyip.com/sergiotarxz/Peertube-dl/issues + to help this software improve since I find tracking users a pretty bad way to discover bugs and potential good features.

+ +

This webpage may load third party resources depending on the url you give to it which may put cookies in your browser, you are + encouraged to frecuently delete your browser cookies to avoid those third parties tracking you on internet, Firefox offers you an + option to delete cookies as soon as you close the browser which may be a good idea to enable in the orwellian internet of today.

+
+ X +
+
diff --git a/lib/Peertube/DL/public/js/peertube-dl-web.js b/lib/Peertube/DL/public/js/peertube-dl-web.js index 3ee44eb..d51184e 100644 --- a/lib/Peertube/DL/public/js/peertube-dl-web.js +++ b/lib/Peertube/DL/public/js/peertube-dl-web.js @@ -12,6 +12,8 @@ let video; let modalLoading; let filename; let url; +let popingNotice; +let closePopingNotice; function downloadFormButtonHandler(event) { event.preventDefault(); @@ -20,8 +22,10 @@ function downloadFormButtonHandler(event) { video.src = response.url; filename = response.filename; url = response.url; - modalLoading.classList.remove('active'); - modalVideoContainer.style.display = 'block'; + video.addEventListener('canplay', (event) => { + modalLoading.classList.remove('active'); + modalVideoContainer.style.display = 'block'; + }); }); } @@ -95,11 +99,18 @@ window.addEventListener('load', (event) => { downloadVideoPrepare = document.querySelector('#download-video-prepare'); closeAndResetVideoContainer = document.querySelector('#close-and-reset-video-container'); modalLoading = document.querySelector('#modal-loading'); + popingNotice = document.querySelector('#poping-notice'); + closePopingNotice = document.querySelector('#close-poping-notice'); downloadFormButton.addEventListener('click', downloadFormButtonHandler); downloadVideoPrepare.addEventListener('click', downloadVideoPrepareHandler); downloadForm.addEventListener('submit', downloadFormHandler); closeAndResetVideoContainer.addEventListener('click', closeAndResetVideoContainerHandler); + closePopingNotice.addEventListener('click', (event) => { + popingNotice.classList.remove('active'); + }); + + popingNotice.classList.add('active'); });