您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
2023/9/18 17:09:04
当前为
// ==UserScript== // @name youtube-create-sorted-playlist-related-channnels-when-clicked // @namespace Violentmonkey Scripts // @match https://www.youtube.com/* // @grant none // @version 1.0 // @author - // @description 2023/9/18 17:09:04 // @require https://code.jquery.com/jquery-1.12.4.js // @license MIT // ==/UserScript== var enable_flag = true; // until page reload var str_enablebtn_txt = "#auto create channnel's playlist: "; var func_tmp01 = function(str_link) { stringUrl = str_link; stringUrl += "&list=UL01234567890"; document.location = stringUrl; }; document.addEventListener('yt-navigate-finish', () => { // enable / disable btn var place = $(document).find("ytd-playlist-panel-renderer > div:nth-child(1), yt-chip-cloud-renderer > div:nth-child(1), body > yt-live-chat-app"); var enable_btn = $('<span class="ycsprcwc_btn01" style="display: inline-block; padding: .25em .5em; color:#FFF; font-size: 1.5em; background: #333; border: 2px dotted #FFF; border-radius: .35em; text-decoration: underline; cursor: pointer;">'+str_enablebtn_txt+((enable_flag)?"on":"off")+'</span>'); if ($('body .ycsprcwc_btn01:visible').length < 1) { place.prepend(enable_btn); } // Check URL var str_link = String(window.location.href); if (/\&list\=/.test(str_link)) { return; } if (/watch\?v\=/.test(str_link)) { if (enable_flag) { func_tmp01(str_link); } } }); $(document).on("click", ".ycsprcwc_btn01", (e) => { if (enable_flag) { enable_flag = false; } else { enable_flag = true; } $('.ycsprcwc_btn01').text(str_enablebtn_txt+((enable_flag)?"on":"off")); });