- // ==UserScript==
- // @name Streaming Simple (Expérimental)
- // @namespace http://tampermonkey.net/
- // @version 0.8.2
- // @description Pour TV Time vérifie si la saison est completement(pour vérifier clicker sur " ⟳ " ). Ajout d'un lien (🔍)et simplification d'utilisation.
- // @license MIT
- // @author DEV314R
- // @match https://www.tvtime.com/fr
- // @match https://www.tvtime.com/fr/*
- // @match https://www.tvtime.com/*/to-watch
- // @match https://dl-protect.net/*
- // @icon https://icons.duckduckgo.com/ip2/tvtime.com.ico
- // @run-at document-start
- // @grant GM_addStyle
- // ==/UserScript==
- if(location.href.search(/www.tvtime.com/gi)>-1){csstime()}
- document.addEventListener('DOMContentLoaded',()=>{
- if(location.href.search(/www.tvtime.com/gi)>-1){
-
-
- const juste=1//1=seulement les complète | 0=tous avec indication
- const jour=0//jour en décalage par rapport au jour de sortie de la serie
-
- var site="www.zone-telechargement.tech/?p=series&search="
-
-
- const a=document.querySelectorAll(".episode-details.poster-details > a[href],#all-shows > section > ul> li > div > div > h2 >a")
- var k=0
- function re(){
- var i=document.querySelector("#rech")
- var cl=a.length
- if (k<=cl){
- setTimeout(()=>{
- recherche(k)
- //.then(()=>{
- k++;re()
- //})
- },100)
- //console.table({k,cl});
- if(k===cl){
- i.value="👌";
- document.getElementById("rech").removeAttribute("id");
- }
- else{
- i.value="⌛"
- i.style.background="#000"
- }
- }
- }
- if(location.href.search(/www.tvtime.com\/.+\/show\//gi)>-1){
- var d1=new Date().valueOf()
- var 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()
- if(d1>=d2){
- document.title="✅"+document.title.replace(/TV Time - /gi,"")
- }else{document.title="❌"+document.title.replace(/TV Time - /gi,"")
- //setTimeout(()=>{window.close(document.URL)},3000)
- document.querySelector('.col-sm-2.actions > .row > .active.watched-btn.col-sm-offset-4.col-sm-6 > .icon-tvst-watch').scrollIntoView()
- }
- if(location.href.search(/www.tvtime.com\/.+\/show\/\d+/gi)>-1){
- var dn=document.querySelector("#top-banner > div > div.info-zone > div > div > h1")
- dn.innerHTML+=('<a style="border:0.1em ridge #ffd700;border-radius:20%;" href="https://'+site+dn.innerText.replace(/ 🔍/gi,"")+'" target="_blank">🔍</a>')
- }
- }
- else{
- 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>')
- }
-
- ////
- const OnEvent=(doc)=>{
- return{
- on:(type,selector,callback)=>{
- doc.addEventListener(type,(event)=>{
- if(!event.target.matches(selector))return;
- callback.call(event.target,event);
- },false);
- }}};
- OnEvent(document).on('click','#rech',()=>{
- re()
- //addboutoncopie()
- })
- ////
-
- async function recherche(num){
- var s=a[num]
- var url=s.href
- var dd=s
-
- var da=new Date().valueOf()
-
- var xhr=new XMLHttpRequest();
- xhr.open("GET",url,true);//debugaurl+url
- xhr.responseType="document";
-
- xhr.onload=async function(){
- if(xhr.readyState==4 && xhr.status==200){
- var response = xhr.responseXML.querySelector(".season-content.active > ul > li:last-child > div > div > a>.episode-air-date");
-
- var db= new Date(response.textContent.match(/\d\d\d\d-\d\d-\d\d/gi)[0]).valueOf();
- if(da>=(db+(jour*86400000))){
- dd.innerText+="✅"
- }
- else{
- if(juste==1){
- dd.parentNode.parentNode.parentNode.removeChild(dd.parentNode.parentNode);
-
- }
- dd.innerText+="❌";
- dd.innerHTML+=("<br> "+((db-da)/86400000).toFixed(0)+" jours restants avant sortie complète")
- }
- dd.innerText+=response.innerText
- var EpisodeMax=xhr.responseXML.querySelectorAll('[itemprop="season"].season-content.active > ul > li').length
- dd.innerHTML+=("<br>nombre d'épisode: "+EpisodeMax)
- //console.log(response);
- }};
- //xhr.onerror =function(){console.error(xhr.status, xhr.statusText);}
- xhr.send();
- }
-
- addboutoncopie()
- function addboutoncopie(){
- var cl=document.querySelectorAll(".episode-details.poster-details > a")
- for (var g=0;g<cl.length;g++){
- var s=cl[g]
- var ed=s.innerText
- s.parentNode.parentNode.firstElementChild.innerHTML+=('<a style="border:0.2em ridge #ffd700;border-radius:20%;z-index:100;" target="_blank" href="https://'+site+s.innerText.replace(/ /gi,"+")+'" >🔍</a>')
- }
- }
-
-
- }else if(location.href.search(/dl-protect.net/gi)>-1){
- GM_addStyle(`body,.urls{color:#ddd;background:#000!important;}
- #subButton{color:#000;transform: scale(1.5);}
- .navbar,.amigo,footer{display:none!important;}`)
- document.title="⏳"+document.title
- setTimeout(()=>{document.querySelector("#subButton").click()
- document.title="🖱️"+document.title
- },2500)
- setTimeout(()=>{document.querySelector('[rel="external nofollow"]').click()},100)
- document.addEventListener("mouseenter", fcliq);
- function fcliq(){
- let a=document.title="🤖"+document.title
- setTimeout(()=>{document.querySelector("#subButton").click()},100)
- }
- }
- })
-
- function csstime(){
- GM_addStyle(`
- html,.alt-block,#content,section,.row,.body-inner,ul.dropdown-menu,.scrollable,.right{color:#ddd!important;background:#000!important;}
- .credits > p,.social,#get-the-app{display:none;}
- #home {color:#ddd;background:#fbd737;}
-
- h3,.label,.expand-icon{color:#fbd737!important;}
- .label :hover,[data-toggle] :hover{color:#000!important;background:#fbd737;}
- .rank-sticker{color:#000!important;}
- span,h2{color:#fff!important;}
-
- #profile,#to-watch,.main-block{color:#ddd;background:#222;}
- h1,h2 a{color:#ddd!important;}
- .posters-list>li .poster-details .secondary-link{color:#888}
- .dropdown{background:#1a1a1a!important;}
-
- #episode-details.episode.episode-header.banner.change-episode-link{
- width: 43%;
- border: 0.1vw solid #fbd737!important;}
-
- #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 {
- display: block;color: #7cdb62!important;
- }
- `)}