Created
August 11, 2011 17:54
-
-
Save XP1/1140284 to your computer and use it in GitHub Desktop.
Fix YouTube Java detection: Bypasses YouTube's complicated Java detection with something simpler. Allows you to use YouTube's Java-based advanced video upload in Opera.
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 Fix YouTube Java detection | |
// @version 1.01 | |
// @description Bypasses YouTube's complicated Java detection with something simpler. Allows you to use YouTube's Java-based advanced video upload in Opera. | |
// @author XP1 (https://github.com/XP1/) | |
// @namespace https://gist.github.com/1140284/ | |
// @include http*://upload.youtube.*/* | |
// @include http*://*.upload.youtube.*/* | |
// ==/UserScript== | |
// http://upload.youtube.com/my_videos_upload?restrict=java | |
// http://s.ytimg.com/yt/jsbin/www-upload-vflnB6f84.js | |
/*jslint browser: true, vars: true, white: true, maxerr: 50, indent: 4 */ | |
(function (opera) | |
{ | |
"use strict"; | |
opera.addEventListener("BeforeScript", function (userJsEvent) | |
{ | |
var element = userJsEvent.element; | |
if (element.src.indexOf("/www-upload") !== -1) | |
{ | |
element.textContent = element.textContent.replace(/&&\(!navigator\.javaEnabled\(\)\|\|/g, " && navigator.javaEnabled() || (!navigator.javaEnabled() || "); | |
} | |
}, false); | |
}(this.opera)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I posted this user JS in this thread:
Can you use You Tube advanced Video File Upload in Opera?:
http://my.opera.com/community/forums/topic.dml?id=1070452