tampermonkey crunchyroll // ==UserScript== // @name Crunchyroll iFrame Player // @namespace http://tampermonkey.net/ // @version 1.0.3 // @homepageURL https://github.com/itallolegal/crp-iframe-player // @supportURL https://github.com/itallolegal/crp-iframe-player/issues // @description Este script Permite ver todos os vídeos do site crunchyroll gratuitamente. Nota(JarEd): Apenas modifiquei um pouco do código para UserScript, o código original é disponibilizado pelo itallolegal no github em extensão para mobile e desktop, confira a url de download. tampermonkey crunchyroll How to dowload it? tampermonkey crunchyroll // @author JarEdMaster // @match http://www.crunchyroll.com/* // @match https://www.crunchyroll.com/* // @grant none // @icon https://www.crunchyroll.com/favicons/favicon-32x32.png // ==/UserScript== (function() { tampermonkey crunchyroll How to dowload it? tampermonkey crunchyroll 'use strict'; var HTML = document.documentElement.innerHTML; let new_str; let ifrm; function pegaString(str, first_character, last_character) { if(str.match(first_character + "(.*)" + last_character) == null){ return null; }else{ tampermonkey crunchyroll How to dowload it? tampermonkey crunchyroll new_str = str.match(first_character + "(.*)" + last_character)[1].trim() return(new_str) } } function importPlayer(){ console.log("[CR Premium] Removendo player da Crunchyroll..."); var elem = document.getElementById('showmedia_video_player'); elem.parentNode.removeChild(elem); tampermonkey crunchyroll PasteShr tampermonkey crunchyroll console.log("[CR Premium] Pegando dados da stream..."); var video_config_media = JSON.parse(pegaString(HTML, "vilos.config.media = ", ";")); console.log("[CR Premium] Adicionando o jwplayer..."); ifrm = document.createElement("iframe"); ifrm.setAttribute("id", "frame"); ifrm.setAttribute("src", "https://luiz-lp.github.io/crpiframeplayer/"); ifrm.setAttribute("width","100%"); ifrm.setAttribute("height","100%"); ifrm.setAttribute("frameborder","0"); tampermonkey crunchyroll How to get it? tampermonkey crunchyroll ifrm.setAttribute("scrolling","no"); ifrm.setAttribute("allowfullscreen","allowfullscreen"); ifrm.setAttribute("allow","autoplay; encrypted-media *"); if(document.body.querySelector("#showmedia_video_box") != null){ document.body.querySelector("#showmedia_video_box").appendChild(ifrm); }else{ document.body.querySelector("#showmedia_video_box_wide").appendChild(ifrm); } tampermonkey crunchyroll PasteShr tampermonkey crunchyroll if (document.body.querySelector(".freetrial-note") != null) { console.log("[CR Premium] Removendo Free Trial Note..."); document.body.querySelector(".freetrial-note").style.display = "none"; } if(document.body.querySelector(".showmedia-trailer-notice") != null){ console.log("[CR Premium] Removendo Trailer Notice..."); document.body.querySelector(".showmedia-trailer-notice").style.display = "none"; tampermonkey crunchyroll How to get it for free? tampermonkey crunchyroll } if(document.body.querySelector("#showmedia_free_trial_signup") != null){ console.log("[CR Premium] Removendo Free Trial Signup..."); document.body.querySelector("#showmedia_free_trial_signup").style.display = "none"; } ifrm.onload = function(){ tampermonkey crunchyroll How to use it? tampermonkey crunchyroll ifrm.contentWindow.postMessage({ 'video_config_media': [JSON.stringify(video_config_media)], 'lang': [pegaString(HTML, 'LOCALE = "', '",')] },"*"); }; } function onloadfunction() { if(pegaString(HTML, "vilos.config.media = ", ";") != null){ tampermonkey crunchyroll How to get it for free? tampermonkey crunchyroll importPlayer(); } } document.addEventListener("DOMContentLoaded", onloadfunction()); })(); tampermonkey crunchyroll