パソコンで動画サイトに表示されている動画一覧(サムネイルとタイトル)があって、
どの動画を「DLしたか」「していないか」を、1つずつEverythingでチェックしていたのですが、
非常に面倒でした。
しかし、Chromeの拡張機能「Tampermonkey」とパソコンソフト「Everything」で分かる様にできました。
※生成AIに聞いて、作成しました。
・DL済なら、半透明にして
・DL未なら、サムネイルを赤枠で囲むにする
尚、動画一覧から「タイトル部分を抽出」して、検索はパソコンソフト「Everything(HTTPサーバ機能、HTTPサーバポート:8888)を利用しています。
サンプルスクリプト
xxxxxxxx DL Checker Red and translucent
ここから------------------------------------------------------------------------
// ==UserScript==
// @name xxxxxxxx DL Checker Red and translucent
// @namespace http://tampermonkey.net/
// @version 1.2
// @match https://xxxxxxxx.com/*
// @grant GM_xmlhttpRequest
// @connect 127.0.0.1
// ==/UserScript==
(function() {
'use strict';
document.querySelectorAll(".entry-header span").forEach(span => {
const title = span.textContent.trim();
const searchKey = title.split('_')[0];
const article = span.closest("article");
if (!article) return;
GM_xmlhttpRequest({
method: "GET",
url: "http://127.0.0.1:8888/?search=" + encodeURIComponent(searchKey),
onload: function(res) {
// 1件以上ヒットしたらDL済み
const downloaded =
!res.responseText.includes("合計 0 件");
// 【修正部分】
if (downloaded) {
// DL済みの場合は、記事全体を半透明(不透明度30%)にする
article.style.opacity = "0.3";
} else {
// 実DLの場合は、赤枠表示
article.style.outline = "4px solid red";
}
}
});
});
})();
ここまで------------------------------------------------------------------------
注)
・サンプルでは
xxxxxx_yyyyyyy_zzzzzzzz
」
~間をタイトルとして、最初の「_」(アンダーバー)より前の文字列xxxxxxxで検索しています。
・Everythingには、パソコンに保存しているフォルダ、HTTPサーバを有効、HTTPサーバポート(8888)などを設定しておく
・動画サイトを開く際、Everythingを起動させておく必要があります。
どの動画を「DLしたか」「していないか」を、1つずつEverythingでチェックしていたのですが、
非常に面倒でした。
しかし、Chromeの拡張機能「Tampermonkey」とパソコンソフト「Everything」で分かる様にできました。
※生成AIに聞いて、作成しました。
・DL済なら、半透明にして
・DL未なら、サムネイルを赤枠で囲むにする
尚、動画一覧から「タイトル部分を抽出」して、検索はパソコンソフト「Everything(HTTPサーバ機能、HTTPサーバポート:8888)を利用しています。
サンプルスクリプト
xxxxxxxx DL Checker Red and translucent
ここから------------------------------------------------------------------------
// ==UserScript==
// @name xxxxxxxx DL Checker Red and translucent
// @namespace http://tampermonkey.net/
// @version 1.2
// @match https://xxxxxxxx.com/*
// @grant GM_xmlhttpRequest
// @connect 127.0.0.1
// ==/UserScript==
(function() {
'use strict';
document.querySelectorAll(".entry-header span").forEach(span => {
const title = span.textContent.trim();
const searchKey = title.split('_')[0];
const article = span.closest("article");
if (!article) return;
GM_xmlhttpRequest({
method: "GET",
url: "http://127.0.0.1:8888/?search=" + encodeURIComponent(searchKey),
onload: function(res) {
// 1件以上ヒットしたらDL済み
const downloaded =
!res.responseText.includes("合計 0 件");
// 【修正部分】
if (downloaded) {
// DL済みの場合は、記事全体を半透明(不透明度30%)にする
article.style.opacity = "0.3";
} else {
// 実DLの場合は、赤枠表示
article.style.outline = "4px solid red";
}
}
});
});
})();
ここまで------------------------------------------------------------------------
注)
・サンプルでは
xxxxxx_yyyyyyy_zzzzzzzz
~間をタイトルとして、最初の「_」(アンダーバー)より前の文字列xxxxxxxで検索しています。
・Everythingには、パソコンに保存しているフォルダ、HTTPサーバを有効、HTTPサーバポート(8888)などを設定しておく
・動画サイトを開く際、Everythingを起動させておく必要があります。



