Created
November 30, 2010 16:51
-
-
Save supahgreg/721957 to your computer and use it in GitHub Desktop.
shows (typeof ytplayer.getPlayerState) == undefined
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name YouTube Enhancer - Scriptish test | |
| // @include http://youtube.*/* | |
| // @include http://*.youtube.*/* | |
| // @include https://youtube.*/* | |
| // @include https://*.youtube.*/* | |
| // ==/UserScript== | |
| var ytplayer = unsafeWindow.document.getElementById("movie_player"); | |
| if (!ytplayer) { | |
| return alert("ytplayer not found"); | |
| } | |
| GM_log("ytplayer found: " + ytplayer); | |
| // ytplayer found: [object XrayWrapper [object HTMLEmbedElement]] | |
| GM_log("ytplayer.getAttribute('allowscriptaccess'): '" + ytplayer.getAttribute('allowscriptaccess') + "'"); | |
| // ytplayer.getAttribute('allowscriptaccess'): 'always' | |
| GM_log("typeof ytplayer.getPlayerState: " + ytplayer.getPlayerState); | |
| // typeof ytplayer.getPlayerState: undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment