Advertisement
Guest User

Crunchyroll Premium Gratis

a guest
Aug 26th, 2021
3,795
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Crunchyroll iFrame Player
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0.3
  5.  
  6. // @homepageURL https://github.com/itallolegal/crp-iframe-player
  7.  
  8. // @supportURL https://github.com/itallolegal/crp-iframe-player/issues
  9.  
  10.  
  11. // @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.
  12.  
  13. // @author JarEdMaster
  14.  
  15. // @match http://www.crunchyroll.com/*
  16. // @match https://www.crunchyroll.com/*
  17. // @grant none
  18. // @icon https://www.crunchyroll.com/favicons/favicon-32x32.png
  19. // ==/UserScript==
  20.  
  21. (function() {
  22. 'use strict';
  23.  
  24. var HTML = document.documentElement.innerHTML;
  25. let new_str;
  26. let ifrm;
  27.  
  28. function pegaString(str, first_character, last_character) {
  29. if(str.match(first_character + "(.*)" + last_character) == null){
  30. return null;
  31. }else{
  32. new_str = str.match(first_character + "(.*)" + last_character)[1].trim()
  33. return(new_str)
  34. }
  35. }
  36.  
  37. function importPlayer(){
  38. console.log("[CR Premium] Removendo player da Crunchyroll...");
  39. var elem = document.getElementById('showmedia_video_player');
  40. elem.parentNode.removeChild(elem);
  41.  
  42. console.log("[CR Premium] Pegando dados da stream...");
  43. var video_config_media = JSON.parse(pegaString(HTML, "vilos.config.media = ", ";"));
  44.  
  45. console.log("[CR Premium] Adicionando o jwplayer...");
  46. ifrm = document.createElement("iframe");
  47. ifrm.setAttribute("id", "frame");
  48. ifrm.setAttribute("src", "https://luiz-lp.github.io/crpiframeplayer/");
  49. ifrm.setAttribute("width","100%");
  50. ifrm.setAttribute("height","100%");
  51. ifrm.setAttribute("frameborder","0");
  52. ifrm.setAttribute("scrolling","no");
  53. ifrm.setAttribute("allowfullscreen","allowfullscreen");
  54. ifrm.setAttribute("allow","autoplay; encrypted-media *");
  55.  
  56. if(document.body.querySelector("#showmedia_video_box") != null){
  57. document.body.querySelector("#showmedia_video_box").appendChild(ifrm);
  58. }else{
  59. document.body.querySelector("#showmedia_video_box_wide").appendChild(ifrm);
  60. }
  61.  
  62.  
  63. if (document.body.querySelector(".freetrial-note") != null) {
  64. console.log("[CR Premium] Removendo Free Trial Note...");
  65. document.body.querySelector(".freetrial-note").style.display = "none";
  66. }
  67.  
  68.  
  69. if(document.body.querySelector(".showmedia-trailer-notice") != null){
  70. console.log("[CR Premium] Removendo Trailer Notice...");
  71. document.body.querySelector(".showmedia-trailer-notice").style.display = "none";
  72. }
  73.  
  74.  
  75. if(document.body.querySelector("#showmedia_free_trial_signup") != null){
  76. console.log("[CR Premium] Removendo Free Trial Signup...");
  77. document.body.querySelector("#showmedia_free_trial_signup").style.display = "none";
  78. }
  79.  
  80.  
  81. ifrm.onload = function(){
  82. ifrm.contentWindow.postMessage({
  83. 'video_config_media': [JSON.stringify(video_config_media)],
  84. 'lang': [pegaString(HTML, 'LOCALE = "', '",')]
  85. },"*");
  86. };
  87.  
  88.  
  89. }
  90. function onloadfunction() {
  91. if(pegaString(HTML, "vilos.config.media = ", ";") != null){
  92. importPlayer();
  93. }
  94. }
  95. document.addEventListener("DOMContentLoaded", onloadfunction());
  96. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement