🏠 Home 

Flash iframe allowfullscreen

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


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