您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A simple extension that allows users to hide verified users, download videos, and play videos at the highest quality with 30fps.
// ==UserScript== // @name Download videos, watch videos at 30fps (with highest quality), and hide verified users. // @description A simple extension that allows users to hide verified users, download videos, and play videos at the highest quality with 30fps. // @author // @namespace Twitter, but better. // @version 1.0 // @match https://twitter.com/* // @match https://mobile.twitter.com/* // @run document-start // @grant none // ==/UserScript== (function() { "use strict"; // Function to hide verified users function hideVerifiedUsers() { // Get all the verified users on the page const verifiedUsers = document.querySelectorAll(".verified"); // Hide all the verified users for (const verifiedUser of verifiedUsers) { verifiedUser.style.display = "none"; } } // Function to download videos function downloadVideos() { // Get all the videos on the page const videos = document.querySelectorAll("video"); // Check if the user has clicked on the 3 dots if (event.target.tagName === "DIV" && event.target.classList.contains("more-options")) { // Get the video element const video = event.target.parentElement.querySelector("video"); // Download the video const videoUrl = video.src; const videoFileName = videoUrl.split("/").pop(); const videoFile = new File([videoUrl], videoFileName); const videoSaveLocation = `${window.location.origin}/downloads/${videoFileName}`; videoFile.save(videoSaveLocation); } } // Function to play videos at the highest quality with 30fps function playVideosAtHighestQuality() { // Get all the videos on the page const videos = document.querySelectorAll("video"); // Set the quality of all the videos to the highest quality for (const video of videos) { video.playbackRate = 30; video.videoHeight = 1080; video.videoWidth = 1920; } } // Add event listeners to the extension buttons document.getElementById("hide-verified-users-button").addEventListener("click", hideVerifiedUsers); document.querySelectorAll(".more-options").forEach(button => button.addEventListener("click", downloadVideos)); document.getElementById("play-videos-at-highest-quality-button").addEventListener("click", playVideosAtHighestQuality); })();