Simple •TvTime➡️(Télécharger🔛Regarder)

Objectif Simple TROUVER SERIES (Complete) sur tvtime.com vous pourrez avoir cliquer sur 🔍 pour trouver votre serie est rapidement la regarder ou la télécharger.Sur TV Time pour vérifie si une saison est completement clicker sur " ⟳ " ). Ajout d'un lien (🔍)et simplification d'utilisation. ET ajout d'un boutton pour [TOUT DL] (vérifier bien que vous autoriser l'ouverture de "Fenêtres contextuelles et redirections" sur le site). Et autre filtre(type best quality)...)

目前为 2023-06-10 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Simple •TvTime➡️(Télécharger🔛Regarder)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2.01
  5. // @description Objectif Simple TROUVER SERIES (Complete) sur tvtime.com vous pourrez avoir cliquer sur 🔍 pour trouver votre serie est rapidement la regarder ou la télécharger.Sur TV Time pour vérifie si une saison est completement clicker sur " ⟳ " ). Ajout d'un lien (🔍)et simplification d'utilisation. ET ajout d'un boutton pour [TOUT DL] (vérifier bien que vous autoriser l'ouverture de "Fenêtres contextuelles et redirections" sur le site). Et autre filtre(type best quality)...)
  6. // @license MIT
  7. // @author DEV314R
  8. // @match https://www.tvtime.com/fr
  9. // @match https://www.tvtime.com/fr/*
  10. // @match https://www.tvtime.com/*/to-watch
  11. // @match https://dl-protect.link/*
  12. // @match https://www.zone-telechargement.cyou/?p=serie*
  13. // @match https://www.zone-telechargement.cyou/?p=manga*
  14. // @match https://www.zone-telechargement.cyou/?p=autres-videos&search*
  15. // @match https://www.zone-telechargement.cyou/?search=*
  16. // @icon https://external-content.duckduckgo.com/ip3/www.tvtime.com.ico
  17. // @run-at document-start
  18. // @grant GM_addStyle
  19. // @grant window.close
  20. // ==/UserScript==
  21.  
  22. const juste=1//1=seulement les complètes | 0=toutes avec indications
  23. const jour=0//jour en plus après la sortie de la serie avant vérification
  24. let ConfirmerRecherche=0// 1=oui (expérimental) | 0=non
  25. const Temp=1000//Temp en ms (1000ms=1seconde) entre chaque ouverture des liens de [TOUT DL]
  26.  
  27.  
  28. if(location.href.search(/www.tvtime.com/gi)>-1){csstime()}
  29. document.addEventListener('DOMContentLoaded',()=>{
  30. if(location.href.search(/www.tvtime.com/gi)>-1){
  31.  
  32.  
  33. const site="www.zone-telechargement.cyou/?p=series&search="
  34.  
  35.  
  36. const a = document.querySelectorAll(".episode-details.poster-details > a[href],#all-shows > section > ul> li > div > div > h2 >a");
  37. let k = 0;
  38.  
  39. const cl=document.querySelectorAll('.episode-details.poster-details > a');
  40. for(let g=0;g<cl.length;g++) {
  41. const s=cl[g];
  42. const ed=s.innerText.replace(/ 🔍|\(.+\)/gi, '+')//.replace(/[,:].*[^.,:]+/g, "").replace(/[,:!]/g, "")
  43. s.parentNode.parentNode.querySelector(":not(.show-all)").innerHTML+=`<a style="border: 0.2em ridge #ffd700; border-radius: 20%; z-index:99999;" target="_blank" href="https://${site}${ed}">🔍</a>`;
  44. }
  45.  
  46. function re() {
  47. const i = document.querySelector("#rech");
  48. const cl = a.length;
  49. if (k < cl) {
  50. setTimeout(async()=>{
  51. await recherche(k);
  52. k++;
  53. re();
  54. }, 10);
  55. i.value = "⌛";
  56. i.style.background = "#000";
  57. } else if (k === cl) {
  58. i.value = "👌";
  59. i.removeAttribute("id");
  60. }}
  61.  
  62. if(location.href.search(/www.tvtime.com\/.+\/show\//gi)>-1){
  63. const d1 = new Date().valueOf();
  64. const d2 = new Date(document.querySelector(".season-content.active > ul > li:last-child > div > div > a>.episode-air-date").textContent.match(/\d\d\d\d-\d\d-\d\d/gi)[0]).valueOf();
  65. if (d1 >= d2) {
  66. document.title = "✅" + document.title.replace(/TV Time - /gi, "");
  67. } else {
  68. document.title = "❌" + document.title.replace(/TV Time - /gi, "");
  69. document.querySelector('.col-sm-2.actions > .row > .active.watched-btn.col-sm-offset-4.col-sm-6 > .icon-tvst-watch').scrollIntoView();
  70. }
  71. if(location.href.search(/www.tvtime.com\/.+\/show\/\d+/gi) > -1) {
  72. const dn=document.querySelector("#top-banner > div > div.info-zone > div > div > h1");
  73. dn.innerHTML += ('<a style="outline:0.1em ridge #ffd700;outline-radius:20%;" href="https://'+site+dn.innerText.replace(/ 🔍|\(.+\)/gi, "")+'" target="_blank">🔍</a>');
  74. }
  75. }else{
  76. document.querySelector("#home-link").insertAdjacentHTML('beforebegin', '<input id="rech" type="button" value="⟳" style="color:#000;background:#ffd700;border: 0.1em solid #ffd700; border-radius:50%;width:2.3em;height:2.3em;"></input><br>');
  77. }
  78.  
  79. ////
  80. const OnEvent=(doc)=>{
  81. return{
  82. on:(type,selector,callback)=>{
  83. doc.addEventListener(type,(event)=>{
  84. if(!event.target.matches(selector))return;
  85. callback.call(event.target,event);
  86. },false);
  87. }}};
  88. OnEvent(document).on('click','#rech',()=>{
  89. re()
  90.  
  91. })
  92.  
  93. async function recherche(num) {
  94. var s = a[num];
  95. var url = s.href;
  96. var dd = s;
  97. var da = new Date().valueOf();
  98. var xhr = new XMLHttpRequest();
  99. xhr.open("GET", url, true);
  100. xhr.responseType = "document";
  101. xhr.onload = function() {
  102. if (xhr.readyState == 4 && xhr.status == 200) {
  103. var response = xhr.responseXML.querySelector('.season-content.active > ul > li:last-child > div > div > a > .episode-air-date');
  104. var db = new Date(response.textContent.match(/\d\d\d\d-\d\d-\d\d/gi)[0]).valueOf();
  105. if (da >= (db + (jour * 86400000))) {
  106. dd.innerText += '✅';
  107. } else {
  108. if (juste == 1) {
  109. dd.parentNode.parentNode.parentNode.removeChild(dd.parentNode.parentNode);
  110. }
  111. dd.innerText+='❌';
  112. dd.innerHTML+=('<br> '+((db-da)/86400000).toFixed(0)+' jours restants avant sortie complète');
  113. }
  114. dd.innerText+=response.innerText;
  115. var EpisodeMax=xhr.responseXML.querySelectorAll('[itemprop="season"].season-content.active > ul > li').length;
  116. dd.innerHTML+=('<br>nombre d\'épisode: ' + EpisodeMax);
  117. }
  118. }
  119. xhr.send();
  120. }
  121.  
  122.  
  123.  
  124.  
  125.  
  126. }else if(location.href.search(/dl-protect.+\//gi)>-1){
  127.  
  128. GM_addStyle(`body,.urls{color:#ddd;background:#000!important;}
  129. #subButton{color:#000;transform: scale(1.5);}
  130. .navbar,.amigo,footer{display:none!important;}`)
  131. document.title="⏳"+document.title
  132. setTimeout(()=>{document.querySelector("#subButton").click()
  133. document.title="🖱️"+document.title
  134. },3000)
  135. setTimeout(()=>{document.querySelector('[rel="external nofollow"]').click()},100)
  136. let a=document.addEventListener("mouseenter", fcliq);
  137. function fcliq(){
  138. document.title="🤖"+document.title
  139. setTimeout(()=>{document.querySelector("#subButton").click()},100)}
  140. var erreur=document.querySelector("#protected-container > div:nth-child(2) > div > ul > li > a")
  141. if(erreur.innerText.search(/invalide/gi)>-1){
  142. erreur.click()
  143. }
  144.  
  145. }
  146.  
  147. if(location.href.search(/(serie|manga)&id/gi)>-1){
  148. var t= document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(3)")
  149. var d1=document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(4)").textContent.match(/\d+(?=\sEpisode)/gi)[0]
  150. var dm=document.querySelector("center > .postinfo").innerText.match(/\d+/gi)
  151. let match= dm.includes(d1)
  152. t.textContent=(match?"✅":"❌")+t.textContent;
  153. if (t.textContent.startsWith("✅")){ajouterBoutonTelechargement();}
  154. }
  155.  
  156. function ajouterBoutonTelechargement() {
  157. var elements = document.querySelectorAll('div[style*="font-weight:bold;color:#c442b5"],div[style*="font-weight:bold;color:#000000"],div[style*="font-weight:bold;color:#fbaf4e"],div[style*="font-weight:bold;color:#f47445"],div[style*="font-weight:bold;color:#5390a8"],div[style*="font-weight:bold;color:#333ba8"],div[style*="font-weight:bold;color:#43a047"]');
  158. for (var i = 0; i < elements.length; i++) {
  159. var element = elements[i];
  160. var nom = element.innerText.trim();
  161. element.insertAdjacentHTML('afterbegin', '<a id="tdl" style="border: 0.2em ridge #ffd700;padding:0.2em;margin:0.2em;cursor:pointer;"> TOUT DL ' + nom + '</a>');
  162. }
  163.  
  164. var result = document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(4)").textContent.match(/\d+(?=\sEpisode)/gi);
  165. var finalResult = result ? parseInt(result[0]) : 0;
  166.  
  167. const links = document.querySelectorAll(".postinfo > b > a[href]");
  168.  
  169. var index = 0;
  170.  
  171. function openLink() {
  172. links[index].click();
  173. index++;
  174. setTimeout(() => {
  175. if (finalResult > index) {
  176. openLink();
  177. }
  178. }, Temp);
  179. }
  180.  
  181. const OnEvent = (doc) => {
  182. return {
  183. on: (type, selector, callback) => {
  184. doc.addEventListener(type, (event) => {
  185. if (!event.target.matches(selector)) return;
  186. callback.call(event.target, event);
  187. }, false);
  188. }
  189. };
  190. };
  191.  
  192. OnEvent(document).on('click', '#tdl', () => {
  193. openLink();
  194. });
  195. }
  196.  
  197.  
  198.  
  199. if(location.href.search(/(serie|manga)&id/gi)>-1){
  200. var siteT="https://www.tvtime.com/fr/"
  201. var nom=document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(3)").innerText
  202. document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(3)").insertAdjacentHTML('beforeend', '<a style="border: 0.2em ridge #ffd700; color:ffd700; background:#000; margin-left:0.6em;" target="_blank" href="'+siteT+'##'+nom.replace(/✅|❌/gi,'')+'">TV Time</a><br>')
  203. }else if (location.href.match(/www.tvtime.com\/fr\/##.+/gi)>-1){
  204. var recherche=document.querySelector("#global-search-input")
  205. if (location.href.match(/##.+/gi)){
  206. var decodedText = decodeURIComponent(location.href.split("##")[1]);
  207. recherche.value = decodedText;
  208. }
  209. //recherche en cours...
  210. }
  211.  
  212.  
  213. if(location.href.search(/((serie|manga)(s)?)(&(id|s))?/gi)>-1){extractContent();}
  214.  
  215. function extractContent() {
  216. // Référence pour les URL
  217. var urlElements = document.querySelectorAll("#dle-content > div:nth-child(n+4) > div:nth-child(4) div div a[href]");
  218. // Référence pour le contenu à afficher
  219. var targetElements = document.querySelectorAll("#dle-content > div:nth-child(n+4) > div:nth-child(4) div div a[href]");
  220.  
  221. // Conversion de la référence NodeList en un tableau
  222. urlElements = Array.from(urlElements);
  223. targetElements = Array.from(targetElements);
  224.  
  225. // Génération d'un tableau de promesses qui exécutent la récupération du contenu à partir de l'URL
  226. var promises = urlElements.map(function(urlElement, i) {
  227. var url = urlElement.href;
  228.  
  229. return fetch(url)
  230. .then(function(response) {
  231. return response.text();
  232. })
  233. .then(function(html) {
  234. // Extraction du contenu
  235. var parser = new DOMParser();
  236. var doc = parser.parseFromString(html, "text/html");
  237. var sourceElement = doc.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(4)");
  238. // Extraction du numéro de l'épisode le plus récent
  239. var dernierepisodeP2 = Math.max(...(doc.querySelector("center > .postinfo").innerText.match(/\d+/gi)));
  240. // Renvoi du contenu extrait
  241. var innerText = sourceElement.innerText.match(/\d+ Episodes/gi);
  242. if (innerText !== null && parseInt(innerText[0].match(/\d+/gi)[0]) === parseInt(dernierepisodeP2)) {
  243. // L'épisode est le plus récent, on ajoute un message de mise à jour
  244. innerText = "✅Complet " + innerText;
  245. }else if(innerText == null){innerText = "❗␀ " + innerText;}
  246. else {
  247. // L'épisode est incomplet, on retire l'élément parent de targetElements
  248. targetElements[i].parentElement.parentElement.parentElement.parentElement.remove();
  249.  
  250. }
  251. return {
  252. targetElement: targetElements[i],
  253. innerText: innerText
  254. };
  255. });
  256. });
  257.  
  258. // Attente de la résolution de toutes les promesses avant de mettre à jour les éléments cibles
  259. Promise.all(promises).then(function(results) {
  260. results.forEach(function(result) {
  261. result.targetElement.innerHTML += "<br>" + result.innerText;
  262. });
  263. });
  264. }
  265.  
  266.  
  267. function site(href){return location.href.search(href)>-1}
  268.  
  269. if (ConfirmerRecherche===1){
  270. if(location.href.search(/zone-telechargement.+(&search|search=)/gi)>-1){retirerNonConformes("#story",".cover_infos_title",3).then(function2);
  271.  
  272. setTimeout(()=>{
  273. document.title="⏳"+document.title
  274. if((document.querySelector("#dle-content > div:nth-child(4)").innerText.match(/Aucune fiches trouvées/gi)/*||!document.querySelector("#dle-content > div:nth-child(5) > div:nth-child(4) > div > div > a")*/) && location.href.search(/mangas/gi)>-1){
  275. window.open(location.href.replace(/series&search/gi,"mangas&search"), "_self");
  276. }else if((document.querySelector("#dle-content > div:nth-child(4)").innerText.match(/Aucune fiches trouvé/gi)/*||!document.querySelector("#dle-content > div:nth-child(5) > div:nth-child(4) > div > div > a")*/) && location.href.search(/mangas/gi)>-1){
  277. window.open(location.href.replace(/mangas&search/gi,"autres-videos&search"), "_self");
  278. }else if((document.querySelector("#dle-content > div:nth-child(4)").innerText.match(/Aucune fiches trouvé/gi)/*||!document.querySelector("#dle-content > div:nth-child(5) > div:nth-child(4) > div > div > a")*/) && location.href.search(/autres-videos/gi)>-1){
  279. /* document.title="🙅"+document.title
  280. document.querySelector("body").innerText="Pas trouver fermeture dans 5 Seconde"
  281. setTimeout(function f(){window.close(document.URL)},5000)*/
  282.  
  283. }},3000)
  284. }
  285.  
  286. function retirerNonConformes(element,tableau,profondeur) {
  287. return new Promise(resolve=>{
  288. var ele =document.querySelector(element)
  289. var text=ele.value
  290. var eleconvertiregex=new RegExp(text,"gi");
  291. var tableaux=document.querySelectorAll(tableau)
  292. for(var j=0;j<tableaux.length;j++){
  293. if((tableaux[j].innerText.search(eleconvertiregex))>-1){
  294. }else{
  295. var s=tableaux[j];
  296. for(var i=0;i<profondeur;i++){
  297. s=s.parentNode;
  298. }
  299. s.parentNode.removeChild(s);
  300. }}
  301. resolve();
  302. });
  303. }
  304.  
  305. function function2(){
  306. var elem4=document.querySelectorAll("#dle-content > div.cover_global:nth-child(n+5)")
  307. if(elem4.length===1){document.querySelector("#dle-content > div.cover_global:nth-child(5) a").click()
  308. }
  309. }
  310.  
  311. if(location.href.search(/zone-telechargement.+(series&search|(serie|manga)&id=|search=)/gi)>-1){removeLessImportant("#dle-content > div:nth-child(n+5) > div:nth-child(4) > div > div > span > span > b");}
  312. function removeLessImportant(arre) {
  313. var arr = document.querySelectorAll(arre);
  314. let best;
  315. for (let i = 0; i < arr.length; i++) {
  316. if (arr[i].textContent.includes("4K")) {
  317. best = arr[i];
  318. break;
  319. } else if (arr[i].textContent.includes("(VF HD)")) {
  320. if (!best || best.textContent.includes("(VF)")) {
  321. best = arr[i];
  322. }
  323. } else if (arr[i].textContent.includes("(VF)")) {
  324. if (!best) {
  325. best = arr[i];
  326. }
  327. }
  328. }
  329. for (let i = 0; i < arr.length; i++) {
  330. if (arr[i] !== best) {
  331. var s=arr[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode
  332. s.parentNode.removeChild(s);
  333. }}}
  334.  
  335. if(location.href.search(/(serie|film)&id/gi)>-1){clickOnElement2("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(4)",/vf|720p|HDRIP|BDRIP/gi,"#dle-content > div.base > div > div.corps > div:nth-child(1) > div.otherversions > a > span > span > b",/\(VF HD\)|1080p/gi)}
  336. function clickOnElement2(element1,txt1, element2,txt2) {
  337. if(document.querySelector(element1).innerText.search(txt1)>-1 && document.querySelector(element2).innerText.search(txt2)>-1) {
  338. document.querySelector(element2).click();}
  339. }
  340.  
  341. }
  342. if(site(/&search|\?search=|mangas&(page|genre)/gi)){retirer(4,/ VOSTFR |\(VOSTFR HD\)|\(VOSTFR\)|\(Coréen\)|\(Polonais\)|\(Espagnol\)|\(Anglais\)|\(Japonais\)|HDCAM|\(VO\)|^(HDRiP MD|TS( MD)?)$/gi,"span,a,b");}
  343. function retirer(profondeur,filtre,cible){
  344. var ref=filtre;
  345. var cl=document.querySelectorAll(cible);
  346. for(var k=0;k<cl.length;k++){
  347. var match=false;
  348. if(Array.isArray(ref)){
  349. for(var u=0;u<ref.length;u++){
  350. if(cl[k].innerText.match(ref[u])){
  351. match=true;
  352. break;
  353. }}
  354. }else{
  355. match=cl[k].innerText.match(ref);
  356. }
  357. if(match){
  358. var s=cl[k];
  359. for(var i=0;i<profondeur;i++){
  360. s=s.parentNode;}
  361. s.parentNode.removeChild(s);
  362. }}}
  363.  
  364.  
  365. })
  366.  
  367.  
  368. function csstime(){
  369. GM_addStyle(`
  370. section{padding:0;margin:0}
  371. html,.alt-block,#content,section,.row,.body-inner,ul.dropdown-menu,.scrollable,.right{color:#ddd!important;background:#000!important;}
  372. .credits > p,.social,#get-the-app{display:none;}
  373. #home {color:#ddd;background:#fbd737;}
  374. h3,.label,.expand-icon{color:#fbd737!important;}
  375. .label :hover,[data-toggle] :hover{color:#000!important;background:#fbd737;}
  376. .rank-sticker{color:#000!important;}
  377. span,h2{color:#fff!important;}
  378. #profile,#to-watch,.main-block{color:#ddd;background:#222;}
  379. h1,h2 a{color:#ddd!important;}
  380. .posters-list>li .poster-details .secondary-link{color:#888}
  381. .dropdown{background:#1a1a1a!important;}
  382. #episode-details.episode.episode-header.banner.change-episode-link{
  383. width: 43%;
  384. border: 0.1vw solid #fbd737!important;}
  385. #actor-discussion .filters, #profile-discussion .filters, #profile-shows #favorite-shows .progress, #profile-shows #favorite-shows h3, #profile-shows .labels h4, #profile-shows .posters-list>li .poster-details h3 {
  386. display: block;color: #7cdb62!important;}
  387. `)}