Last active
August 6, 2017 05:34
-
-
Save Zren/c1deb07fab0c985889c9 to your computer and use it in GitHub Desktop.
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 watchcartoononline | |
// @description Description | |
// @author Chris H (Zren / Shade) | |
// @icon http://xshade.ca/favicon.ico | |
// @namespace http://xshade.ca | |
// @version 1 | |
// @include http://www.watchcartoononline.com/* | |
// @include http://www.animeuploads.com/embed.php* | |
// ==/UserScript== | |
if (document.location.href.match(/^http:\/\/www\.watchcartoononline\.com\/.*/)) { | |
var iframe = document.querySelector('iframe[id^="frameNewAnimeuploads"]'); | |
if (iframe) { | |
// Video Browser | |
// Default to the animeuploads tab. | |
var tabId = iframe.parentNode.id; | |
tabId = tabId.substr(0, 'postTabs_'.length) + 'li_' + tabId.substr('postTabs_'.length); | |
document.querySelector('#' + tabId + ' a').click(); | |
GM_addStyle('#wrap { position: static !important; padding-top: 100vh !important; } iframe[id^="frameNewAnimeuploads"] { position: absolute; top: 0; left: 0; width: 100% !important; height: 100vh !important; }'); | |
} | |
} else if (document.location.href.match(/^http:\/\/www\.animeuploads\.com\/embed\.php.*/)) { | |
// Video Host | |
var submitButton = document.querySelector('form input[type="submit"]'); | |
if (submitButton) { | |
// GET request | |
// Submit form | |
submitButton.click(); | |
} else { | |
// POST request | |
// Autoplay video | |
jwplayer('myJwVideo').play(); | |
GM_addStyle('html, body, #myJwVideo_wrapper, #myJwVideo { width: 100% !important; height: 100% !important; }'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment