Flash iframe allowfullscreen

解决某些网页flash播放器点击全屏无效的问题 (请求全屏已拒绝,至少一个文档包含的元素不是一个 iframe,或没有"allowfullscreen"属性。 index TypeError: The expression cannot be converted to return the specified type.)

当前为 2019-06-15 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Flash iframe allowfullscreen
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description 解决某些网页flash播放器点击全屏无效的问题 (请求全屏已拒绝,至少一个文档包含的元素不是一个 iframe,或没有"allowfullscreen"属性。 index TypeError: The expression cannot be converted to return the specified type.)
  6. // @author greasyfork baster
  7. // @match *://*/*
  8. // @run-at document-end
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. var iframes = document.getElementsByTagName("iframe");
  15. for (var i = 0; i < iframes.length; i++) {
  16. iframes[i].setAttribute("allowfullscreen",true);
  17. //console.log("set iframe allowfullscreen");
  18. }
  19.  
  20. })();