您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a "Download" button to every BitChute video page
当前为
// ==UserScript== // @name BitChute | Video Download Button // @namespace de.sidneys.greasemonkey // @homepage https://gist.githubusercontent.com/sidneys/b4783b0450e07e12942aa22b3a11bc00/raw/ // @version 1.2.0 // @description Adds a "Download" button to every BitChute video page // @author sidneys // @icon https://www.bitchute.com/static/images/android-icon-192x192.png // @include *://*bitchute.com/video/* // @require https://gf.qytechs.cn/scripts/38888-greasemonkey-color-log/code/Greasemonkey%20%7C%20Color%20Log.js // @require https://gf.qytechs.cn/scripts/38889-greasemonkey-waitforkeyelements-2018/code/Greasemonkey%20%7C%20waitForKeyElements%202018.js // @run-at document-end // ==/UserScript== /** * @default * @constant */ DEBUG = false; /** * Render download button * @param {String} target - Target URL */ let renderDownloadButton = (target) => { console.debug('renderDownloadButton'); /** * URL * @type {URL} */ const targetURL = new URL(target); /** * Href * @type {String} */ const targetHref = targetURL.href; /** * Filename * @type {String} */ const targetFilename = targetURL.pathname.split('/').pop(); // Create element const element = document.createElement('li'); element.innerHTML = ` <a href="${targetHref}" download="${targetFilename}"> Download Video (${targetFilename}) </a> `; // Append element const parentElement = document.querySelector('.video-info-bar ul.info-ul'); parentElement.appendChild(element); /** * Filename * @type {String} */ console.info('Video Download URL:', targetHref); }; /** * Init */ let init = () => { console.debug('init'); // Watch feed items waitForKeyElements('source', (element) => { renderDownloadButton(element.src); }); }; /** * @listens window:Event#load */ window.addEventListener('load', () => { console.debug('window#load'); init(); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址