Adding notice cookies and source code.

This commit is contained in:
sergiotarxz 2020-12-30 20:18:42 +01:00
parent 25b399a374
commit 85920ebec8
Signed by untrusted user who does not match committer: sergiotarxz
GPG Key ID: E5903508B6510AC2
3 changed files with 81 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -2,6 +2,7 @@
<head>
<script src="js/peertube-dl-web.js"></script>
<link rel="stylesheet" href="css/index.css"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="application-container">
@ -29,5 +30,20 @@
</div>
</div>
</div>
<div id="poping-notice">
<p>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 <a href="https://gitea.sergiotarxz.freemyip.com/sergiotarxz/Peertube-dl">my gitea</a> under the AGPLv3 license.<p>
<p>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
<a href="https://gitea.sergiotarxz.freemyip.com/sergiotarxz/Peertube-dl/issues">https://gitea.sergiotarxz.freemyip.com/sergiotarxz/Peertube-dl/issues</a>
to help this software improve since I find tracking users a pretty bad way to discover bugs and potential good features.</p>
<p>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.</p>
<div id="poping-notice-container-bar">
<a id="close-poping-notice">X</a>
</div>
</div>
</body>
</html>

View File

@ -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');
});