mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-17 10:14:39 -05:00
add auto play :3
This commit is contained in:
parent
0b0922ae25
commit
3a9363b460
1 changed files with 64 additions and 3 deletions
|
@ -284,6 +284,14 @@
|
|||
<link href=https://p.poketube.fun/https://site-assets.fontawesome.com/releases/v6.1.1/css/all.css rel=stylesheet>
|
||||
<link href=https://p.poketube.fun/https://unpkg.com/ionicons@4.5.10-0/dist/css/ionicons.css rel=stylesheet>
|
||||
|
||||
|
||||
<noscript>
|
||||
<style>
|
||||
.auto-play{
|
||||
display:none !important;;
|
||||
}
|
||||
</style>
|
||||
</noscript>
|
||||
<% if (video.id == "QrGrOK8oZG8") { %>
|
||||
|
||||
<style>
|
||||
|
@ -308,6 +316,34 @@ text-shadow: 1px 1px #000,1px 1px 0.1px #000;!important;
|
|||
|
||||
<body>
|
||||
|
||||
<script>
|
||||
<!--//--><![CDATA[//><!--
|
||||
/**
|
||||
* @licstart The following is the entire license notice for the JavaScript
|
||||
* code in this page.
|
||||
*
|
||||
* Copyright (C) 2021-2023 PokeTube (https://github.com/iamashley0/poketube)
|
||||
*
|
||||
* The JavaScript code in this page is free software: you can redistribute
|
||||
* it and/or modify it under the terms of the GNU General Public License
|
||||
* (GNU GPL) as published by the Free Software Foundation, either version 3
|
||||
* of the License, or (at your option) any later version. The code is
|
||||
* distributed WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GPL
|
||||
* for more details.
|
||||
*
|
||||
* As additional permission under GNU GPL version 3 section 7, you may
|
||||
* distribute non-source (e.g., minimized or compacted) forms of that code
|
||||
* without the copy of the GNU GPL normally required by section 4, provided
|
||||
* you include this license notice and a URL through which recipients can
|
||||
* access the Corresponding Source.
|
||||
*
|
||||
* @licend The above is the entire license notice for the JavaScript code
|
||||
* in this page.
|
||||
*/
|
||||
|
||||
//--><!]]>
|
||||
</script>
|
||||
<div class="app" id="secret-theme" style="color:var(--text-color)">
|
||||
|
||||
|
||||
|
@ -956,6 +992,11 @@ display: block; !important;" autoplay controls
|
|||
|
||||
|
||||
<div class="recommended-list" align="center">
|
||||
<div style="text-align: left;" class="auto-play">
|
||||
<label for="continue">[BETA] AutoPlay:</label>
|
||||
<input name="continue" id="continue" type="checkbox" >
|
||||
<a href="https://codeberg.org/Ashley/poketube/issues/new">feedback</a>
|
||||
</div>
|
||||
|
||||
<div class="tags rec" >
|
||||
<div class="tag" style="background:var(--chip-background-hover)">
|
||||
|
@ -1103,6 +1144,26 @@ Recommended Videos
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0-or-later
|
||||
checkbox = document.getElementById("continue");
|
||||
|
||||
checkbox.addEventListener('change', function(e) {
|
||||
if(checkbox.checked) {
|
||||
|
||||
console.log("[AUTOPLAY BETA] enabled")
|
||||
|
||||
document.getElementById('video').addEventListener('ended',autoplaynextvideo,false);
|
||||
|
||||
function autoplaynextvideo(e) {
|
||||
location.href = "/watch?v=<%- k.Video.Recommendations.Video[0].id%>"
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<% if (!optout) { %>
|
||||
<!-- MORE INFO :https://poketube.fun/privacy -->
|
||||
<!-- MORE INFO :https://poketube.fun/privacy -->
|
||||
|
|
Loading…
Reference in a new issue