Auto Set Youtube Volume

Choose the default volume for YouTube videos!

  1. // ==UserScript==
  2. // @name Auto Set Youtube Volume
  3. // @namespace YTVol
  4. // @version 5
  5. // @description Choose the default volume for YouTube videos!
  6. // @author hacker09
  7. // @match https://www.youtube.com/embed/*
  8. // @match https://www.youtube.com/watch?v=*
  9. // @icon https://www.youtube.com/s/desktop/03f86491/img/favicon.ico
  10. // @run-at document-start
  11. // @grant GM_getValue
  12. // @grant GM_setValue
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17. if (GM_getValue('Default_Volume') === undefined) //If the Default_Volume wasn't set yet
  18. { //Starts the if condition
  19. GM_setValue('Default_Volume', 20); //Save the Default YT Volume as 20%
  20. } //Finishes the if condition
  21.  
  22. window.sessionStorage.setItem('yt-player-volume', '{"data":"{\\"volume\\":' + GM_getValue('Default_Volume') + ',\\"muted\\":false}","creation":' + new Date().valueOf() + '}'); //Set the Default YT Volume
  23. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址