YouTube HTML5 AutoPause, modified for new player (August 2015)

Automatically pause YouTube HTML5 videos when they appear.

目前为 2015-08-15 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name YouTube HTML5 AutoPause, modified for new player (August 2015)
  3. // @namespace https://github.com/sunaku
  4. // @description Automatically pause YouTube HTML5 videos when they appear.
  5. // @include https://*.youtube.com/watch*
  6. // @include http://*.youtube.com/watch*
  7. // @version 0.2
  8. // @copyright 2014 Suraj N. Kurapati, 2015 modified chk1
  9. // @grant none
  10. // @run-at document-end
  11. // ==/UserScript==
  12.  
  13. var buttons = document.querySelectorAll('.ytp-play-button');//[aria-label="Pause"]
  14. for (var i in buttons) {
  15. buttons[i].click();
  16. //console.log(buttons[i]);
  17. }