このようなfivbのページhttps://en.volleyballworld.com/volleyball/competitions/volleyball-nations-le…
- User
Assistant
以下のUserscriptを提案します:
// ==UserScript== // @name FIVB Subscribe Popup Remover // @namespace http://tampermonkey.net/ // @version 1.0 // @description Remove subscribe popup from FIVB Volleyball Nations League schedule page // @match https://en.volleyballworld.com/volleyball/competitions/volleyball-nations-league/schedule/* // @grant none // ==/UserScript== (function() { 'use strict'; function removeSubscribePopup() { // モーダルやポップアップを非表示/削除 const popupSelectors = [ '.modal-backdrop', '.modal', '[class*="subscribe-popup"]', '[class*="newsletter-popup"]', '#subscribeModal' ]; popupSelectors.forEach(selector => { const elements = document.querySelectorAll(selector); elements.forEach(el => { el.style.display = 'none'; el.remove(); }); }); // bodyのオーバーフロー設定を元に戻す document.body.style.overflow = 'auto'; } // ページ読み込み時に実行 window.addEventListener('load', removeSubscribePopup); // DOM変更を監視 const observer = new MutationObserver(removeSubscribePopup); observer.observe(document.body, { childList: true, subtree: true }); })();使用方法
- Tampermonkey(Chrome)またはGreasemonkey(Firefox)をインストール
- 新しいスクリプトを作成
- 上記のコードをコピー&ペースト
- 保存
特徴
- ページ読み込み時にポップアップを削除
- DOM変更を継続的に監視
- 複数のセレクタで対応
- bodyのスクロール制限を解除
注意: 実際のウェブサイト構造に応じて、セレクタを調整する必要があるかもしれません。
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.