Skip to content

Commit

Permalink
add topic mode
Browse files Browse the repository at this point in the history
Signed-off-by: Ashley //// <iamashley@duck.com>
  • Loading branch information
ashley0143 committed Feb 28, 2024
1 parent 7955857 commit 0b5d8e3
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions html/poketube.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,41 @@ background-color: #0000;
top: 0;
}
</style>
<% if(shortsui) { %>
<% if(shortsui) { %>
<script>
// Function to apply styles after DOM has loaded
function applyStyles() {
const styles = `
.player {
width: fit-content;
margin-left: auto;
margin-right: auto;
height: fit-content;
}
.video-player-container {
max-width: fit-content;
min-width: fit-content;
margin-left: auto;
margin-right: auto;
aspect-ratio: var(--ptd-watch-width-ratio) / var(--ptd-watch-height-ratio);
}
`;
// Create a style element and set its content
const styleElement = document.createElement('style');
styleElement.innerHTML = styles;
// Append the style element to the document head
document.head.appendChild(styleElement);
}
// Event listener to call applyStyles after DOM has loaded
window.onload = applyStyles;
</script>
<% } %>
<% if (inv_vid.author.endsWith(' - Topic')) { %>
<script>
// Function to apply styles after DOM has loaded
function applyStyles() {
Expand Down Expand Up @@ -622,7 +656,6 @@ background-color: #0000;
window.onload = applyStyles;
</script>
<% } %>
<% if(dm) { %>
Expand Down

0 comments on commit 0b5d8e3

Please sign in to comment.