アマプラNextup表示切替

  • /*
     * @title アマプラNextup表示切替
     * @description Amazonプライムビデオの邪魔なNext upカードの表示/非表示を切り替える
     * @include https://www.amazon.co.jp/gp/video/*
     * @license MIT License
     * @require 
     */
    
    
    (function() {
      // -nextupcard-show を含むすべての div 要素を取得
      const elements = document.querySelectorAll('div[class*="-nextupcard-show"]');
      
      // 各要素の表示状態をトグル
      elements.forEach(element => {
        // 現在の表示状態を確認
        const currentDisplay = window.getComputedStyle(element).display;
        
        // 表示状態をトグル
        if (currentDisplay === 'none') {
          element.style.display = '';  // デフォルトの表示状態に戻す
        } else {
          element.style.display = 'none';  // 非表示にする
        }
      });
    })();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2025/04/17 18:04:23 - 04/17