zerotab

Zerotab - the zero-javascript lightweight startpage. Demo at https://tab.alex.balgavy.eu
git clone git://git.alex.balgavy.eu/zerotab.git
Log | Files | Refs | README

movies.html (2207B)


      1 <!DOCTYPE html>
      2 <html lang="en">
      3   <head>
      4     <meta charset="UTF-8">
      5     <title>Search - Ebooks</title>
      6     <meta charset="utf-8">
      7     <meta name="viewport" content="width=device-width, initial-scale=1.0">
      8     <!-- For browsers without prefers-color-scheme, change theme based on time of day -->
      9     <script type="text/javascript">
     10       if (window.matchMedia('(prefers-color-scheme: dark)').media === 'not all') {
     11         document.documentElement.style.display = 'none';
     12         var hour = new Date().getHours();
     13         var sheet = (hour >= 18 || hour < 7) ? "css/dark.css" : "css/light.css";
     14         document.head.insertAdjacentHTML(
     15           'beforeend',
     16           '<link rel="stylesheet" type="text/css" href="'+sheet+'" onload="document.documentElement.style.display = \'\'">'
     17         );
     18       }
     19     </script>
     20     <!-- For browsers without JS, load the light theme -->
     21     <noscript><link rel="stylesheet" type="text/css" href="css/light.css"></noscript>
     22     <!-- For browsers supporting prefers-color-scheme, use that -->
     23     <link rel="stylesheet" type="text/css" href="css/dark.css" media="(prefers-color-scheme: dark)">
     24     <link rel="stylesheet" type="text/css" href="css/light.css" media="(prefers-color-scheme: light)">
     25 
     26     <script>
     27       document.addEventListener('DOMContentLoaded', function() {
     28         document.getElementById('searchform').onsubmit = function(event) {
     29           event.preventDefault();
     30           var searchstring = event.currentTarget[0].value;
     31           console.log(event);
     32           var engines = [
     33             `https://libgen.rs/search.php?req=${searchstring}`,
     34             `https://annas-archive.org/search?q=${searchstring}`,
     35             `https://standardebooks.org/ebooks?query=${searchstring}`,
     36           ];
     37           for (var i in engines) {
     38             window.open(engines[i], "_blank");
     39           }
     40         }
     41       })
     42     </script>
     43   </head>
     44   <body>
     45     <noscript>This will not work without JS, which is required to open links in new tabs.</noscript>
     46     <h1>Search Movies</h1>
     47     <form id='searchform'>
     48       <input id='search' type="text" class="text" value="" name="q" placeholder="Search..." autocomplete="off" tabindex="0">
     49     </form>
     50   </body>
     51 </html>