Aether Slide

try to take over the world!

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Aether Slide
// @namespace    http://tampermonkey.net/
// @version      2025-03-24.1
// @description  try to take over the world!
// @author       You
// @match        https://dpaiext.ntuh.gov.tw/dpai/slide/virtual-slide-box/*
// @icon         https://dpaiext.ntuh.gov.tw/favicon.ico
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

// Script using the CSSStyleSheet API to add blurring effect
(function() {
  // Check if the browser supports constructable stylesheets
  if ('CSSStyleSheet' in window && 'replace' in CSSStyleSheet.prototype) {
    // Create a new stylesheet
    const stylesheet = new CSSStyleSheet();

    // Define the CSS rules
    const cssRules = `
      /* Blur the elements by default */
      div.ag-body-viewport div[comp-id] > div[comp-id],
      .ag-header-row > *
      {


      display: none;
&:nth-child(1), &:nth-child(2), &:nth-child(5){
display: block;

}

&:nth-child(2){width: 240px !important;}
&:nth-child(5){width: 320px !important;}

}

      div.ag-body-viewport div[comp-id] > div[comp-id] {

&:nth-child(5){

        filter: blur(5px);
        transition: filter 0.3s ease;

        /* Show clearly on hover */
      &:hover {
        filter: blur(0);
      }
      }
      }

      
    `;

    // Replace the contents of the stylesheet with our rules
    stylesheet.replace(cssRules)
      .then(() => {
        // Add the stylesheet to the document
        document.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];
        console.log('Blur stylesheet has been added using CSSStyleSheet API');
      })
      .catch(err => {
        console.error('Error applying stylesheet:', err);
      });
  } else {
    // Fallback for browsers that don't support constructable stylesheets
    const style = document.createElement('style');
    style.textContent = `
      div.ag-body-viewport div[comp-id] > div[comp-id]:nth-child(5) {
        filter: blur(5px);
        transition: filter 0.3s ease;
      }

      div.ag-body-viewport div[comp-id] > div[comp-id]:nth-child(5):hover {
        filter: blur(0);
      }
    `;
    document.head.appendChild(style);
    console.log('Blur stylesheet has been added using fallback method');
  }
})();
    // Your code here...
})();