您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes attributes and lets PiP run when you press `alt+ctrl+p`
当前为
// ==UserScript== // @name 2 in 1 PiP Tool // @version 2.2 // @description Removes attributes and lets PiP run when you press `alt+ctrl+p` // @author Edward D // @include http://* // @include https://* // @namespace https://edwarddk.github.io/EdwardD-Portfolio/ // ==/UserScript== //FOR THE PIP PRESS ALT + CTRL + P (function() { 'use strict'; window.addEventListener("play", function(e) { e.target.removeAttribute("disablePictureInPicture") }, true) window.addEventListener("pause", function(e) { e.target.removeAttribute("disablePictureInPicture") }, true) console.log('RUNNING'); document.body.addEventListener('keyup', function(e){ if(e.altKey && e.ctrlKey && e.key === 'p') { var video = document.querySelector('video'); video.requestPictureInPicture(); } }) })();