Aether Slide

try to take over the world!

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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...
})();