Remove PiP Disable Attributes

Clear disablePictureInPicture attributes from videos.

当前为 2021-05-18 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Remove PiP Disable Attributes
  3. // @version 1.0
  4. // @description Clear disablePictureInPicture attributes from videos.
  5. // @author Polywock
  6. // @match https://www.hulu.com/*
  7. // @include http://*
  8. // @include https://*
  9. // @namespace https://github.com/polywock
  10. // ==/UserScript==
  11.  
  12. window.addEventListener("play", function(e) {
  13. e.target.removeAttribute("disablePictureInPicture")
  14. }, true)
  15.  
  16. window.addEventListener("pause", function(e) {
  17. e.target.removeAttribute("disablePictureInPicture")
  18. }, true)