Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-opus-4-20250514· AnthropicHugging Face LMArena Human Preference 140K

https://www.sanspo.com/resizer/v2/YO7OGYENWNGFTJJCGWFUSDKVEM.jpg?auth=a4678dd38ef8e25849b…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-3-5-haiku-20241022’s answer.
  1. User
  2. Claude Assistant

    以下は、Sanspoのresizer URLから&quality以降のパラメータを除去して画像を最大化するUserscriptです:

    // ==UserScript==
    // @name         Sanspo Image Maximizer
    // @namespace    http://tampermonkey.net/
    // @version      1.0
    // @description  Remove quality and size parameters from Sanspo resizer URLs to get full size images
    // @author       You
    // @match        https://*.sanspo.com/*
    // @match        https://sanspo.com/*
    // @grant        none
    // ==/UserScript==
    
    (function() {
        'use strict';
    
        function maximizeImages() {
            // すべての画像要素を取得
            const images = document.querySelectorAll('img');
            
            images.forEach(img => {
                if (img.src && img.src.includes('resizer/v2/')) {
                    // &qualityより前の部分を抽出(authパラメータは保持)
                    const newSrc = img.src.replace(/(&quality=.*)/i, '');
                    if (newSrc !== img.src) {
                        img.src = newSrc;
                    }
                    
                    // srcsetがある場合も処理
                    if (img.srcset) {
                        img.srcset = img.srcset.replace(/(&quality=.*?)(?=\s|$)/gi, '');
                    }
                }
            });
            
            // リンク要素も処理(画像へのリンクの場合)
            const links = document.querySelectorAll('a[href*="resizer/v2/"]');
            links.forEach(link => {
                if (link.href.includes('&quality=')) {
                    link.href = link.href.replace(/(&quality=.*)/i, '');
                }
            });
            
            // picture要素内のsource要素も処理
            const sources = document.querySelectorAll('source');
            sources.forEach(source => {
                if (source.srcset && source.srcset.includes('resizer/v2/')) {
                    source.srcset = source.srcset.replace(/(&quality=.*?)(?=\s|$)/gi, '');
                }
            });
        }
    
        // ページ読み込み時に実行
        maximizeImages();
        
        // 動的に追加される画像にも対応
        const observer = new MutationObserver(function(mutations) {
            mutations.forEach(function(mutation) {
                if (mutation.addedNodes.length) {
                    maximizeImages();
                }
            });
        });
        
        // 監視を開始
        observer.observe(document.body, {
            childList: true,
            subtree: true
        });
        
        // 遅延読み込み画像への対応
        document.addEventListener('scroll', function() {
            setTimeout(maximizeImages, 100);
        }, { passive: true });
    })();
    

    このUserscriptは以下の機能を持っています:

    1. パラメータ除去: &quality以降のすべてのパラメータ(quality、focal、width、height等)を除去
    2. 認証保持: authパラメータは保持されるため、画像へのアクセスは維持
    3. 動的コンテンツ対応: MutationObserverで後から追加される画像も処理
    4. 複数要素対応: img、a、source要素のすべてを処理
    5. 遅延読み込み対応: スクロール時にも再チェック

    使用方法:

    1. Tampermonkey等のUserscript拡張機能をインストール
    2. 新しいスクリプトを作成し、上記のコードを貼り付け
    3. 保存してSanspoのサイトを訪問

    これにより、リサイズされた画像が自動的にオリジナルサイズの画像に置き換わります。

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.