Flash iframe allowfullscreen

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

As of 19.02.2022. See апошняя версія.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Flash iframe allowfullscreen
// @namespace    https://greasyfork.org/zh-CN/users/306433
// @version      0.2
// @description  解决某些网页flash播放器点击全屏无效的问题 (请求全屏已拒绝,至少一个文档包含的元素不是一个 iframe,或没有"allowfullscreen"属性。 index TypeError: The expression cannot be converted to return the specified type.)
// @author       baster
// @supportURL   https://greasyfork.org/zh-CN/users/306433-baster
// @homepageURL  https://greasyfork.org/zh-CN/users/306433
// @match        *://*/*
// @run-at       document-end
// @grant        none
// ==/UserScript==

;(function () {
  'use strict'
  var iframes = document.getElementsByTagName('iframe')
  for (var i = 0; i < iframes.length; i++) {
    iframes[i].setAttribute('allowfullscreen', true)
  }
})()