<meta charset="utf-8">
<script src="jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    var baseUrl;
    if (window.location.protocol === "file:") {
        baseUrl = "file://" + window.location.pathname.match(/(.*)[\/\\]/)[1];
    } else {
        baseUrl = window.location.href.match(/(.*)[\/\\]/)[1];
    }
    $("#navbar").load(baseUrl + "/Navbar.html");
    // Print the URL in the DOM
    //var urlElement = $("<p>").text("URL: " + baseUrl + "/Navbar.html");
    //$(".formClass").append(urlElement);
});
</script>
<div class="formClass">
    <div id="navbar">
    </div>
</div>



<script>
if (window.location.href.includes("lowbandwidth")) {
  var style = document.createElement("style");
  style.innerHTML = `embed, img:not(#important) {display: none !important;}`;
  document.head.appendChild(style);
}
</script>




<!---Browser Games:---><br>
<a href="https://ry3yr.github.io/OSTR/Diarykeepers_Homepage/Games.html" target="_blank">Browsergames (old)</a> <a target="_blank" href="https://alceawis.de/saves.html?savegames"><img src="http://icons.iconarchive.com/icons/flat-icons.com/square/512/save-icon.png" id="important"  width=15px><img></a> 
<a target="_blank" href="https://my.hidrive.com/share/frxp9-y2cx#$/" style=color:pink>Mods</a>
<button id="showLinksButton" style="border: none;"> </button><br><br>

<u>Currently <a target="_blank" href="https://alcea-wisteria.de/PHP//0demo/2024-02-26-GameHypeWriter/game.html" style=color:black>hyped</a> for</u>: | 
<object type="text/html" data="https://alcea-wisteria.de/PHP/0demo/2024-02-26-GameHypeWriter/game.html
" style="border:0px #ffffff none;" name="statusit" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="30px" width="1000px" allowfullscreen></object>
<!--<iframe src=https://alcea-wisteria.de/PHP/0demo/2024-02-26-GameHypeWriter/game.html
" style="border:0px #ffffff none;" name="statusit" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="23px" width="1000px" allowfullscreen></iframe>-->

<!----AlceaLP-Channel--icon-->
<style>.image-container{display:flex;align-items:center;margin:0px 0}
.image-container hr{flex-grow:1;border:none;border-top:1px solid black;margin:0 0px}
</style><div class="image-container"><hr><img src="https://alcea-wisteria.de/PHP/0demo/2023-07-09-FetchMastodonAva/alcea/0ldCea/alcea_2024-02-08.png" id="important" style="display: block; margin: 0 auto; height: 35px;"><hr></div>
<!----AlceaLP-Channel------>
<a target="_blank" href="https://m.youtube.com/@alceasgamingbouquet/playlists" style=color:blue>Latest</a>:<br>
<iframe src="data:text/html;base64,
 
" style="border:0px #ffffff none;" name="statusit" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="100px" width="600px" allowfullscreen></iframe>

<!--<iframe id="frame" src="rss-scrolling-source-nintendonews.html" frameborder="0" scrolling="no" height=220 width=450 style="background:transparent; border:transparent;" allowtransparency="true"></iframe><a target="_blank" href="rss-scrolling-source-nintendonews.html" style=color:blue>src</a>-->

<!--NintendoNews-iframe-cachebust-version-->
<iframe 
    id="frame" 
    src="" 
    frameborder="0" 
    scrolling="no" 
    height="220" 
    width="450" 
    style="background:transparent; border:transparent;" 
    allowtransparency="true">
</iframe>
<a 
    id="frameLink" 
    target="_blank" 
    href="#" 
    style="color:blue">src</a>
<script>
    // Cache-busting mechanism
    const cacheBust = new Date().getTime(); // Generate a timestamp
    const iframeSrc = `rss-scrolling-source-nintendonews.html?cacheBust=${cacheBust}`;
    // Update iframe and link dynamically
    const iframe = document.getElementById('frame');
    const link = document.getElementById('frameLink');
    iframe.src = iframeSrc;
    link.href = iframeSrc;
</script>




<br>
<details><summary><b>Recording Equipment</b></summary>
•<b>Hardware:</b> <a target="_blank" href="https://pastebin.com/raw/KDBRBDFv" style=color:blue>
GenkiShadowcast</a><br>
•<b>Software:</b> [Android] <a target="_blank" href="https://usb-camera.de.uptodown.com/android/post-download/122782415" style=color:blue>USBCamera</a><br>
<hr>
<u>Downscale Command:</u><br>
cd /storage/emulated/0/DCIM/USBCamera<br>
for file in *.mp4;  do ffmpeg -i "$file" -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2" -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k "${file%.*}_output.mp4";<br>
done
<br><br><hr>
#Til if you disable #Microphone access in #OS (#LineageOS / #Android ) it will break #USBCamera (i.o. Error)
https://ibb.co/L98R6sb
https://i.ibb.co/GC0pkrB/Screenshot-20240705-122820-Einstellungen.png
</details><hr>

<!---ShowWriteGameLinks--->
<!--<button id="showLinksButton" style="border: none;">Show Links</button>-->
  <script>
    document.getElementById('showLinksButton').addEventListener('click', function() {
      var urlParams = new URLSearchParams(window.location.search);
      if (urlParams.get('user') === 'admin') {
        var links = document.querySelectorAll('a#transp');
        for (var i = 0; i < links.length; i++) {
          links[i].style.color = 'red';
        }
      } else {
        alert('Sorry, you do not have permission.');
      }
    });
  </script>

<!----LastPlayed--->
<!--<object type="text/html" data="/other/extra/fetchdata/2024-01-14-Lastplayed/render.html" style="width:800px; height:350px"></object><br>-->

<!--self--resizing-->
<div id="container"></div>
<script>
  const container = document.getElementById('container');
  const objectHeightText = document.createElement('div');
  objectHeightText.style.marginTop = '10px';
  objectHeightText.style.fontFamily = 'monospace';
  objectHeightText.style.color = 'gray';
  objectHeightText.textContent = ""; 
  const objectElement = document.createElement('object');
  objectElement.type = 'text/html';
  objectElement.data = '/other/extra/fetchdata/2024-01-14-Lastplayed/render.html';
  objectElement.style.width = '800px';
  objectElement.style.height = 'auto';
  objectElement.onload = function() {
    const objectDoc = objectElement.contentDocument || objectElement.contentWindow.document;
    function measureObjectHeight() {
      const bodyHeight = objectDoc.body.scrollHeight;
      objectElement.style.height = `${bodyHeight + 33}px`; // Add some padding if necessary
    }
    measureObjectHeight();
    setInterval(measureObjectHeight, 3000); // Check for content height changes periodically
  };
  container.appendChild(objectElement);
  container.appendChild(objectHeightText);
</script>
&nbsp;&nbsp;&nbsp;<a target="_blank" href="https://alcea-wisteria.de/PHP/0demo/2024-01-14-Lastplayed/current.html" style=color:blue>-></a><br>


<!--old--ver-->
<!--<object type="text/html" data="https://alcea-wisteria.de/PHP/0demo/2024-01-14-Lastplayed/current.html" style="width:800px; height:35px"></object><br>-->

<!----RandomGameSuggestor--->
   <div id="collection-links" style="border: 1px solid black; padding: 0px;width:58%"></div>
<script>
  const keywordArray = ['Apex', 'FUZE', 'freakout', 'saints', 'fugitive', 'modern', 'police'];
  function fetchData() {
    fetch('collection.json')
      .then(response => response.json())
      .then(data1 => {
        const randomIndex1 = Math.floor(Math.random() * data1.items.length);
        const randomEntry1 = data1.items[randomIndex1];
        fetch('steam_library.json')
          .then(response => response.json())
          .then(data2 => {
            const games = data2.response.games;
            const randomIndex2 = Math.floor(Math.random() * games.length);
            const randomGame = games[randomIndex2];
            let randomEntry = Math.random() < 0.5 ? randomEntry1.name + ' (NintendoSwitch)' : randomGame.name + ' (Steam)';
            const matchedKeyword = keywordArray.find(keyword => randomEntry.toLowerCase().includes(keyword.toLowerCase()));
            const linkText = matchedKeyword ? '<b>[I hateThis]</b>' : '[Nah. Something else, please!]'; //alt keyword line
            if (matchedKeyword) {triggerRefetch();} //refetch upon keyword
            document.getElementById('collection-links').innerHTML = `<p><u>Why not play:</u> <b>${randomEntry}</b> today ? <a href="#" onclick="fetchData()">${linkText}</a></p>`;
          });
      });
  }
  function triggerRefetch() {
  setTimeout(() => {fetchData();},20);}
  fetchData();
</script>


<!-----gamedbgames--->
<details><summary>other games</summary>
<a target="_blank" href="https://alcea-wisteria.de/PHP/0demo/2024-01-07-GameDatabase/gamedb.php" style=color:lightgray>(+)</a><br><br>
<iframe src="gamedbrender.html
" style="border:0px #ffffff none;" name="statusit" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="850px" width="100%" allowfullscreen></iframe>
<!---
<script src="jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    var baseUrl;
    if (window.location.protocol === "file:") {
        baseUrl = "file://" + window.location.pathname.match(/(.*)[\/\\]/)[1];
    } else {
        baseUrl = window.location.href.match(/(.*)[\/\\]/)[1];
    }
    $("#gamedbgames").load(baseUrl + "/gamedbrender.html");
});
</script>
<div class="formClass">
    <div id="gamedbgames">
    </div>
</div>
</div>-->
</details>



<!-----Steam--->
<br>
<style>.image-container{display:flex;align-items:center;margin:10px 0}
.image-container hr{flex-grow:1;border:none;border-top:1px solid black;margin:0 10px}
</style><div class="image-container"><hr><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Steam_icon_logo.svg/768px-Steam_icon_logo.svg.png" id="important" style="display: block; margin: 0 auto; height: 35px;"><hr></div>
<!-----SteamBG--->
<style>.tile-sectionsteam {background-image: url('other/images/bg/steambg.gif');background-repeat: repeat;background-size: 34px;animation: scroll45deg 2s linear infinite;}@keyframes scroll45deg {0% {background-position: 0 0;}100% {background-position: 34px 34px;}}</style><div class="tile-sectionsteam">
<object type="text/html" data="https://alcea-wisteria.de/PHP//0demo/2024-07-05-GameCheckTools/2024-07-05-LastplayedSteamGame/lastplayedsteam.php" 
        height="130px" width="320px" scrolling="no" style="opacity: 0.75;"></object>
<br>
 <a target="_blank" href="https://steamcommunity.com/id/alceawisteria#https://steamcommunity.com/profiles/76561198119673186/games/?tab=all" style=color:transparent>[Alcea's Steam Library]</a> 
<a target="_blank" href="https://pastebin.com/raw/NEvnT00R#VBTuhcEightB#https://nimbusweb.me/share/9875971/p5eaey35068egx0mbopu"><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQhtw7LrfqWH4dRF8KxiNAryoLk_IaMt5AAQHqYCd8SRw&s"   id="important" width=30></img></a>
<script type="text/javascript">
$(document).ready(function(){
    var baseUrl = "steam_library_render.html";
    $("#steamlib").load(baseUrl + "");
});
</script>
<div class="formClass">
    <div id="steamlib">
    </div>
</div><br>
</div>

<!----NintendoLogo--->
<style>.image-container{display:flex;align-items:center;margin:10px 0}
.image-container hr{flex-grow:1;border:none;border-top:1px solid black;margin:0 10px}
</style><div class="image-container"><hr><img src="
https://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Nintendo_red_logo.svg/609px-Nintendo_red_logo.svg.png
" id="important" style="display: block; margin: 0 auto; height: 35px;"><hr></div>
<!----Nintendo--->
<!---NintendoBG--->
<style>.tile-sectionninty {background-image: url('other/images/bg/nintendobg.gif');background-repeat: repeat;background-size: 34px;animation: scroll45deg 2s linear infinite;}@keyframes scroll45deg {0% {background-position: 0 0;}100% {background-position: 34px 34px;}}</style>
<div class="tile-sectionninty">
<br>
<script src="jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    var baseUrl;
    if (window.location.protocol === "file:") {
        baseUrl = "file://" + window.location.pathname.match(/(.*)[\/\\]/)[1];
    } else {
        baseUrl = window.location.href.match(/(.*)[\/\\]/)[1];
    }
    $("#dekugames").load(baseUrl + "/dekugames.html");
    // Print the URL in the DOM
    //var urlElement = $("<p>").text("URL: " + baseUrl + "/Navbar.html");
    //$(".formClass").append(urlElement);
});
</script>
<div class="formClass">
    <div id="dekugames">
    </div>
</div>
<!--</div>--uncomment-to-limit-only-to-NINTENDO-SECTION-->
<!--------GameListWriter--(for lastplayed.php)--->
<details><summary>- </summary>
<plaintext>
<?php
$currentContent = file_get_contents('current.html');
$targetContent = file_get_contents('oldentries.html');
$updatedContent = $currentContent . $targetContent;
$linkpattern = '/<a\b[^>]*>(.*?)<\/a>/'; //remove link
$replacement = '';
$updatedContent = preg_replace($linkpattern, $replacement, $updatedContent);
file_put_contents('oldentries.html', $updatedContent);
?>
<?php
if(isset($_GET['gamename'])) {
    $gamename = $_GET['gamename'];
    $currentDateTime = date('Y-m-d H:i:s');
    $htmlContent = '<u>LastPlayed:</u> ' . $gamename . ' - (' . $currentDateTime . ') <a target="_blank" href="oldentries.html" style="color:gray">(old)</a><br>';
    file_put_contents('current.html', $htmlContent);
    //echo "Successfully updated current.html with the game name: $gamename and current date and time.";
    // Output the iframe with cache busting
    echo "<iframe src='current.html?" . time() . "' style='width: 100%; border: none;'></iframe>";
} else {
    echo "<iframe src='current.html?" . time() . "' style='width: 100%; border: none;'></iframe>";
}
?>

</div>

