您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在主页上自动切换到"最近上传"过滤器
// ==UserScript== // @name Авто переход к "Недавно опубликованные" // @name:en Auto switch to "Recently uploaded" // @name:ru Авто переход к "Недавно опубликованные" // @name:es Cambio automático a "Subidos recientemente" // @name:fr Passage automatique à "Ajoutées récemment" // @name:de Automatischer Wechsel zu "Kürzlich hochgeladen" // @name:it Passaggio automatico a "Caricati di recente" // @name:pt Mudança automática para "Enviados recentemente" // @name:ja 「最近アップロード」への自動切り替え // @name:ko "최근 업로드"로 자동 전환 // @name:zh-CN 自动切换到"最近上传" // @name:zh-TW 自動切換到"最近上傳" // @name:ar التبديل التلقائي إلى "تم الرفع مؤخرًا" // @name:hi "हाल ही में अपलोड किए गए" पर स्वचालित स्विच // @name:tr "Yakın zamanda yüklenenler" filtresine otomatik geçiş // @name:pl Automatyczne przełączanie na "Ostatnio przesłane" // @name:nl Automatisch overschakelen naar "Recent geüpload" // @namespace Violentmonkey Scripts // @match *://www.youtube.com/* // @grant none // @version 1.3 // @author ShishKebab // @license MIT // @description Авто переход к фильтру "Недавно опубликованные" на главной странице // @description:ru Авто переход к фильтру "Недавно опубликованные" на главной странице // @description:en Auto switch to "Recently uploaded" filter on the main page // @description:es Cambio automático al filtro "Subidos recientemente" en la página principal // @description:fr Passage automatique au filtre "Ajoutées récemment" sur la page principale // @description:de Automatischer Wechsel zum Filter "Kürzlich hochgeladen" auf der Hauptseite // @description:it Passaggio automatico al filtro "Caricati di recente" sulla pagina principale // @description:pt Mudança automática para o filtro "Enviados recentemente" na página principal // @description:ja メインページの「最近アップロード」フィルターへの自動切り替え // @description:ko 메인 페이지에서 "최근 업로드" 필터로 자동 전환 // @description:zh-CN 在主页上自动切换到"最近上传"过滤器 // @description:zh-TW 在主頁上自動切換到"最近上傳"過濾器 // @description:ar التبديل التلقائي إلى مرشح "تم الرفع مؤخرًا" في الصفحة الرئيسية // @description:hi मुख्य पृष्ठ पर "हाल ही में अपलोड किए गए" फ़िल्टर पर स्वचालित रूप से स्विच करें // @description:tr Ana sayfadaki "Yakın zamanda yüklenenler" filtresine otomatik geçiş // @description:pl Automatyczne przełączanie na filtr "Ostatnio przesłane" na stronie głównej // @description:nl Automatisch overschakelen naar "Recent geüpload" filter op de hoofdpagina // ==/UserScript== (function() { 'use strict'; // Словарь с переводами "Недавно опубликованные" на разных языках const recentUploadsTranslations = { 'ru': 'Недавно опубликованные', 'en': 'Recently uploaded', 'es': 'Subidos recientemente', 'fr': 'Ajoutées récemment', 'de': 'Kürzlich hochgeladen', 'it': 'Caricati di recente', 'pt': 'Enviados recentemente', 'ja': '最近アップロード', 'ko': '최근 업로드', 'zh-CN': '最近上传', 'zh-TW': '最近上傳', 'ar': 'تم الرفع مؤخرًا', 'hi': 'हाल ही में अपलोड किए गए', 'tr': 'Yakın zamanda yüklenenler', 'pl': 'Ostatnio przesłane', 'nl': 'Recent geüpload', }; const toggleRecentUploadsFilter = () => { const chipButtons = Array.from(document.querySelectorAll('yt-chip-cloud-chip-renderer')); for (const translation of Object.values(recentUploadsTranslations)) { const button = chipButtons.find(el => { const text = el.querySelector('yt-formatted-string')?.textContent; return text === translation; }); if (button && button.getAttribute('aria-selected') === 'false') { button.click(); console.log(`Фильтр "${translation}" включен`); break; } } }; new MutationObserver(() => toggleRecentUploadsFilter()).observe(document.body, { childList: true, subtree: true }); window.addEventListener('load', toggleRecentUploadsFilter); })();