https://www.photoshelter.com/search/ の結果から…
- User
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
以下は、PhotoShelter の検索結果ページ(https://www.photoshelter.com/search/) から不要な pixel.gif(トラッキング用の1x1透明ピクセル画像)を 除外・非表示にするための Userscript です。
https://www.photoshelter.com/img/pixel.gif を含む画像要素を削除// ==UserScript==
// @name PhotoShelter - Remove pixel.gif
// @namespace https://example.com/
// @version 1.0
// @description PhotoShelter の検索結果から pixel.gif を除去します。
// @author YourName
// @match https://www.photoshelter.com/search*
// @grant none
// @run-at document-idle
// ==/UserScript==
(function () {
'use strict';
// pixel.gifが含まれるimgタグを削除する関数
function removePixelGifs() {
const images = document.querySelectorAll('img[src="https://www.photoshelter.com/img/pixel.gif"]');
images.forEach(img => {
// 親要素がある場合は親ごと削除(検索結果のブロック全体を削除)
const parentItem = img.closest('.gallery-item, .search-result-item, li, div');
if (parentItem) {
parentItem.remove();
} else {
img.remove(); // 親要素がない場合、画像だけでも削除
}
});
}
// 初回実行
removePixelGifs();
// 動的に追加されるDOMに対応するための監視
const observer = new MutationObserver(() => {
removePixelGifs();
});
observer.observe(document.body, {
childList: true,
subtree: true
});
// スクロール時に再チェック(無限スクロール対策)
window.addEventListener('scroll', () => {
setTimeout(removePixelGifs, 500);
});
})();
.closest() で指定しているクラス名(.gallery-item, .search-result-itemなど)はサイト構造によって変化する可能性があります。必要に応じて最新HTML構造に基づいて調整してください。必要であれば、CSSでの非表示スタイルで代替することも可能です:
/* CSSバージョン(Stylish等で使用可能) */
img[src="https://www.photoshelter.com/img/pixel.gif"] {
display: none !important;
}
ご希望があれば、他にも類似のトラッキングピクセルや不要要素を一括削除する拡張版も作成可能です!