Aether Slide

try to take over the world!

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==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...
})();