pub / tw2html

Checks online status of streams on twitch.tv and lets you watch them
git clone https://https://src.jayvii.de/pub/tw2html.git
Home | Log | Files | Exports | Refs | README | RSS

commit d8efd01c0c786de49a2408f26bf121f223cb7733
parent 3f77da47dedf0cf0d12304e0aa3a2eb2f9a4335b
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sun, 19 May 2024 21:07:43 +0200

cleanup

Diffstat:
A.htaccess | 15+++++++++++++++
Mlib/build_html.php | 4++++
Mlib/load_streams.php | 4++++
Mlib/loadingscreen.php | 4++++
Dtemplate.html | 33---------------------------------
5 files changed, 27 insertions(+), 33 deletions(-)

diff --git a/.htaccess b/.htaccess @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# SPDX-FileCopyrightText: 2021-2024 JayVii <jayvii[AT]posteo[DOT]de> + +# Disallow file browsing +Options -Indexes + +# Ensure content is loaded as UTF-8 +IndexOptions +Charset=UTF-8 + +# Disallow browsing of certain sub-directories (redirect to 404) +RedirectMatch 404 ^/.git/.*$ +RedirectMatch 404 ^/lib/.*$ +RedirectMatch 404 ^/README$ + + diff --git a/lib/build_html.php b/lib/build_html.php @@ -1,3 +1,7 @@ +<!-- SPDX-License-Identifier: AGPL-3.0-or-later + SPDX-FileCopyrightText: 2024 JayVii <jayvii[AT]posteo[DOT]de> +--> + <?php // Generate Content List diff --git a/lib/load_streams.php b/lib/load_streams.php @@ -1,3 +1,7 @@ +<!-- SPDX-License-Identifier: AGPL-3.0-or-later + SPDX-FileCopyrightText: 2024 JayVii <jayvii[AT]posteo[DOT]de> +--> + <?php // Check Online Status of streams diff --git a/lib/loadingscreen.php b/lib/loadingscreen.php @@ -1,3 +1,7 @@ +<!-- SPDX-License-Identifier: AGPL-3.0-or-later + SPDX-FileCopyrightText: 2024 JayVii <jayvii[AT]posteo[DOT]de> +--> + <?php $content = "<h1 style='text-align:center;'>Please be patient</h1>" . diff --git a/template.html b/template.html @@ -1,33 +0,0 @@ -<!-- SPDX-License-Identifier: AGPL-3.0-or-later - SPDX-FileCopyrightText: 2021-2024 JayVii <jayvii[AT]posteo[DOT]de> ---> - -<!DOCTYPE html> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <!-- Title may be filled in by script --> - <title>%%TITLE%%</title> - <link rel="icon" type="image/png" href="/assets/favicon.png"> - <link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon_16.png"> - <link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon_32.png"> - <link rel="icon" type="image/png" sizes="64x64" href="/assets/favicon_64.png"> - <link rel="icon" type="image/png" sizes="128x128" href="/assets/favicon_128.png"> - <link rel="apple-touch-icon" href="/assets/favicon.png"> - <link rel="stylesheet" type="text/css" href="/assets/css/stylesheet.css"/> - <link rel="stylesheet" href="/assets/css/loading.css" /> - <script async src="/assets/js/twitch.js"></script> - <link crossorigin="use-credentials" rel="manifest" href="/manifest.json"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - </head> - - <body class="list dark"> - <main class="main"> - - <h1>Videos</h1> - <button class="button"><a href="/">&#8962; All Videos</a></button> - <a href="reload.php"><button class="button">&#10227; Refresh</button></a><br> - <form action="https://www.twitch.tv/search" method="GET" style="width:100%;"> - <input id="searchbar" type="text" id="searchInput" name="term" placeholder="&#128269; Search..."> - </form><br> - - <!-- HERE COMES SCRIPT GENERATED CONTENT -->