Greasy Fork

Remova Propagandas E Temporizadores Ao Baixar Filmes

Desativa Temporizadores Decrescentes e Ads em sites brasileiros para baixar filmes em sites de torrent que te redirecionam para outros sites antes de liberar o download.

当前为 2021-03-17 提交的版本,查看 最新版本

// ==UserScript==
// @name         Remova Propagandas E Temporizadores Ao Baixar Filmes
// @namespace    hacker09
// @version      1.0.0.14
// @description  Desativa Temporizadores Decrescentes e Ads em sites brasileiros para baixar filmes em sites de torrent que te redirecionam para outros sites antes de liberar o download.
// @author       hacker09
//@noframes
// @include      *://www.google.*
// @match        *://baixar.club/*
// @match        *://lapumia.net/*
// @match        *://ondebaixa.com/*
// @match        *://www.bluf.online/*
// @match        *://supertorrent.net/*
// @match        *://bravutorrent.com/*
// @match        *://baixarfilmes.top/*
// @match        *://plustorrents.com/*
// @match        *://pirate-filmes.com/*
// @match        *://www.baixafilme.net/*
// @match        *://www.aoseugosto.com/*
// @match        *://lapumiatorrent.net/*
// @match        *://torrentdosfilmes.in/*
// @match        *://www.baixarfilmes.ws/*
// @match        *://comandotorrent.club/*
// @match        *://filmestorrent.gratis/*
// @match        *://bluraytorrent.com.br/*
// @match        *://ondebaixo.com/*
// @match        *://torrentool.org/*
// @match        *://torrentoon.org/*
// @match        *://filmesmega.net/*
// @match        *://ondeeubaixo.net/*
// @match        *://ondeeubaixo.org/*
// @match        *://megatorrents.co/*
// @match        *://filmebaixar.com/*
// @match        *://hidratorrent.org/*
// @match        *://blurayfilmes.com/*
// @match        *://thepirate-day.org/*
// @match        *://filmestorrent.vip/*
// @match        *://torrentdublado.com/*
// @match        *://lacraiatorrent.com/*
// @match        *://megatorrentshd.net/*
// @match        *://completotorrent.com/*
// @match        *://comandofilmes4k.net/*
// @match        *://www.bludvtorrent.com/*
// @match        *://filmesviatorrents.biz/*
// @match        *://www.adrenalinagames.com/*
// @match        *://www.thepiratesfilmes.net/*
// @match        *://torrentfilmesmagnet.com.br/*
// @match        *://www.seriesfilmestorrents.com/*
// @match        *://www.mastercuriosidadesbr.com/*
// @match        *://www.thepiratefilmestorrent.tv/*
// @match        *://www.thepiratefilmestorrent.me/*
// @match        *://www.thepiratefilmestorrent.net/*
// @match        *://www.trixfilmes.com/*
// @match        *://www.baixarfilmetorrent.net/*
// @exclude      /(https:\/\/thepirate-day\.org\/)(novidades-torrent-\d+|atividade|.+-torrent-magnet|livros-pdf-download|top-100-torrent-the-pirate-day|lancamentos-torrent|atores|atrizes|em-breve-para-download|netflix|filmes-vencedores-do-oscar|series-\d+-torrent|filmes-dublados-torrent|series-dublado|estou-com-sorte-the-pirate-day-download-torrent-\d+|filmes-e-series-dublados-dual-audio-legendados-download-torrent|pedidos|avaliacoes|dmca|category|membros|filmes-\d+-torrent-magnet|filmes-torrent-\d+|series-torrent-\d+|filmes-tecnologia-torrent|filmes-.+-torrent-\d+)/

// Abaixo segue a lista dos piores websites para se baixar e ver filmes, eles serão automaticamente redirecionados para o google. São todos sites cheios de propagandas, e que teoricamente deveriam permitir assistir e/ou baixar filmes, porem não e possível fazer isso nesse sites falsos.
// @match        *://boutv.com/*
// @match        *://gumroad.com/*
// @match        *://todosfilmeshd.net/*
// @match        *://laostelephone.com/*
// @match        *://aquitemfilmes.info/*
// @match        *://www.filmesdetv.com/*
// @match        *://mlizcochco.blogspot.com/*
// @match        *://boardiweb.blogspot.com/*
// @match        *://elitedosdownloads.club/*
// @match        *://www.dubladotorrent.com/*
// @match        *://kristi0520.blogspot.com/*
// @match        *://filmestvdublado.home.blog/*
// @match        *://space4vgulia.blogspot.com/*
// @match        *://webtorrentnet.blogspot.com/*
// @match        *://theexconsofymm.blogspot.com/*
// @match        *://filmeshdcompletos1.podbean.com/*
// @icon         https://www.pngitem.com/pimgs/m/464-4640800_adblock-block-ads-icon-png-transparent-png.png
// @grant        GM_registerMenuCommand
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        window.close
// @run-at       document-idle
// ==/UserScript==

(function() {
  'use strict';
  if (top.location.host.match('www.google')) /*Make sure to run only on google */ { //Starts the if condition
    GM_registerMenuCommand("Desativar/Ativar Marcação", ActivateOnGoogle); // Adds an option to the menu
  } // Finishes the if condition

  if (GM_getValue("ActivateOnGoogle") !== true && GM_getValue("ActivateOnGoogle") !== false) { // If the value doesn't exist define it as true
    GM_setValue("ActivateOnGoogle", true); // Defines the variable as true
  } // Finishes the if condition

  function ActivateOnGoogle() // Function to activate/deactivate the highlight on google
  { //Starts the function ActivateOnGoogle
    if (GM_getValue("ActivateOnGoogle") === true) { //If the last config was true, define as false
      GM_setValue("ActivateOnGoogle", false); //Defines the variable as false
    } // Finishes the if condition
    else { // If the last config was false, define as true
      GM_setValue("ActivateOnGoogle", true); //Defines the variable as true
      location.reload(); //Reloads the page
    } // Finishes the else condition
  } // Finishes the function ActivateOnGoogle

  var BlockedWebsites = new RegExp(/todosfilmeshd.net|filmestvdublado.home.blog|aquitemfilmes.info|filmesdetv.com|filmeshdcompletos1.podbean.com|elitedosdownloads.club|laostelephone.com|kristi0520.blogspot.com|theexconsofymm.blogspot.com|dubladotorrent.com|mlizcochco.blogspot.com|boutv.com|webtorrentnet.blogspot.com|boardiweb.blogspot.com|space4vgulia.blogspot.com|gumroad.com/);

  if (top.location.host.match('www.google') && GM_getValue("ActivateOnGoogle") === true) /*Make sure to run only on google */ {
    function HighLight() //Creates a function to HighLight the websites
    { //Starts the function HighLight
      var PageLinks = document.querySelectorAll("cite"); //Add all page links total number to a variable
      for (var i = PageLinks.length; i--;) { //Starts the for condition
        if (PageLinks[i].innerHTML.match(/thepirate-day.org|ondebaixa.com|ondebaixo.com|torrentool.org|torrentoon.org|filmesmega.net|megatorrents.co|ondeeubaixo.net|ondeeubaixo.org|hidratorrent.org|blurayfilmes.com|megatorrentshd.net|lacraiatorrent.com|torrentdublado.com|completotorrent.com|seriesfilmestorrents.com|trixfilmes.com|baixarfilmetorrent.net|bludvtorrent.com|filmebaixar.com|baixar.club|bluraytorrent.com.br|supertorrent.net|torrentfilmesmagnet.com.br|www.baixafilme.net|www.aoseugosto.com|filmestorrent.gratis|plustorrents.com|pirate-filmes.com|www.baixarfilmes.ws|comandotorrent.club|thepiratefilmestorrent.tv|thepiratefilmestorrent.me|thepiratefilmestorrent.net|thepiratesfilmes.net|filmestorrent.vip|filmesviatorrents.biz|comandofilmes4k.net|lapumia.net|lapumiatorrent.net|bravutorrent.com|baixarfilmes.top|torrentdosfilmes.in|www.bluf.online/) !== null) { //If the Result contains any of these links
          PageLinks[i].style.backgroundColor = 'rgba(255, 255, 0, 0.5)'; //Change the element background to Yellow
        } //Finishes the if condition
        if (PageLinks[i].innerHTML.match(BlockedWebsites) !== null) //If the Result contains any of the Blocked Websites
        { //Starts the else condition
          PageLinks[i].style.backgroundColor = 'rgba(255, 0, 0, 0.2)'; //Change the element background to Red
        } //Finishes the else condition
      } //Finishes the for condtiion
    } //Finishes the function HighLight
    HighLight(); //Starts the HighLight Function

    new MutationObserver(async function() { //If the results page changes anything (Like if the user uses anything like the endless google scripts)
      HighLight(); //Starts the HighLight Function
    }).observe(document.querySelector("#rcnt"), { //Defines the element and characteristics to be observed
      attributes: true,
      attributeOldValue: true,
      characterData: true,
      characterDataOldValue: true,
      childList: true,
      subtree: true
    }); //Finishes the definitions that will be observed

  } //Finishes the if condition

  // The codes below closes the trash websites
  if (top.location.host.match(BlockedWebsites) !== null) /*Make sure to run only on the blocked websites*/ {
    window.top.close(); //Close the actual tab
  } // Finishes the if condition

  if (!top.location.host.match('www.google')) /*Make sure to not run only on google */ { //Starts the if condition
    if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) /*If the browser is using the dark theme */ { //Starts the if condition
      document.querySelector("title").innerText = '🏳️☠️ ' + document.querySelector("title").innerText; //Add the pirate flag emoji the tab title
    } // Finishes the if condition
    else //If the browser is using the light theme
    { //Starts the else condition
      document.querySelector("title").innerText = '🏴‍☠️ ' + document.querySelector("title").innerText; //Add the pirate flag emoji the tab title
    } // Finishes the else condition
  } // Finishes the if condition

  if (!top.location.host.match('www.google') && top.location.host.match(/trixfilmes.com|baixarfilmetorrent.net|bludvtorrent.com|filmebaixar.com|baixar.club|bluraytorrent.com.br|supertorrent.net|torrentfilmesmagnet.com.br|www.baixafilme.net|www.aoseugosto.com|filmestorrent.gratis|plustorrents.com|pirate-filmes.com|www.baixarfilmes.ws|comandotorrent.club|thepiratefilmestorrent.tv|thepiratefilmestorrent.me|thepiratefilmestorrent.net|thepiratesfilmes.net|filmestorrent.vip|filmesviatorrents.biz|comandofilmes4k.net|lapumia.net|lapumiatorrent.net|bravutorrent.com|baixarfilmes.top|torrentdosfilmes.in|www.bluf.online/) === null) /*Make sure to not run on google, neither on websites that should only be highlighted on google (The thepiratefilmestorrent,thepiratesfilmes.net,filmestorrent.vip,filmesviatorrents.biz,comandofilmes4k.net sites shouldn't only be highlighted, but the codes below doesn't work on them) */ { //Starts the if condition
    /*Function.prototype.call = function(){};*/
    Function.prototype.apply = function() {}; //Disable JS on the website so that the download buttons will load without ads
    /*Function.prototype.bind = function(){};*/
  } // Finishes the if condition

  if (top.location.host === 'www.mastercuriosidadesbr.com') /*Make sure to run only on mastercuriosidadesbr.com */ {
    document.querySelector("#aviso").style.display = "none"; //Disable Counter Text
    document.querySelector("#loko").style.display = "none"; //Disable Fake Download Button
    document.querySelector("#baixar").style.display = ""; //Enable the Real Download Button
    document.oncontextmenu = function() {}; /*Enables the Right Click */
  } // Finishes the if condition

  if (top.location.host === 'www.adrenalinagames.com') /*Make sure to run only on adrenalinagames.com */ { //Starts the if condition
    document.getElementById('link0').style.display = "none"; //Hides the fake download button
    document.getElementById('link').style.display = "block"; //Shows the real download button
    document.getElementById('msg').style.display = "none"; /*Disable the message "Clique uma vez em um dos anuncios,aguarde 20 segundos na pagina que ira abrir, apos isso o seu download sera liberado" */
  } // Finishes the if condition

  if (top.location.host.match(/megatorrents.co|megatorrentshd.net|thepiratefilmestorrent.tv|thepiratefilmestorrent.me|thepiratefilmestorrent.net|filmestorrent.vip|filmesviatorrents.biz|lapumia.net|baixarfilmes.top/) !== null) /*Make sure to run on the correct websites only */ { //Starts the if condition
    Array.from(document.querySelectorAll('a[target="_blank"]')).forEach(link => link.removeAttribute('target')); //Disable target = "_blank" on the website
  } //Finishes the if condition

  if (top.location.host === 'completotorrent.com') /*Make sure to run only on completotorrent.com */ { //Starts the if condition
    document.querySelector("#myNavbar > ul > li:nth-child(5)").remove(); //Removes the fake "Jogos" download button
  } //Finishes the if condition

  if (top.location.host === 'megatorrentshd.net' && document.querySelector("div#categoria.box_item.center-widget") !== null) /*Make sure to run only on megatorrentshd.net */ { //Starts the if condition
    document.querySelector("div#categoria.box_item.center-widget").innerHTML = document.querySelector("div#categoria.box_item.center-widget").innerHTML; //Remove the advent listeners
    for (var i = document.querySelectorAll("input[onclick='this.focus();this.select()']").length; i--;) { //Starts the for condition
      document.querySelectorAll("[href*='javascript:void();']")[i].href = document.querySelectorAll("input[onclick='this.focus();this.select()']")[i].value; //Removes the fake link and adds the correct unprotected link for all buttons
    } // Finishes the for condition
  } // Finishes the if condition

  if (top.location.host.match(/thepiratefilmestorrent.tv|thepiratefilmestorrent.me|thepiratefilmestorrent.net|thepiratesfilmes.net|filmestorrent.vip|filmesviatorrents.biz|comandofilmes4k.net/) !== null) /*Make sure to run on the correct websites only */ { //Starts the if condition
    var SavedUnprotectedLinks = []; //Creates a new global array
    var SavedUnprotectedLinksIndex = []; //Creates a new global array
    var AllPageLinks = document.querySelectorAll("a"); //Select and store all links on the page
    for (var i = 0, max = AllPageLinks.length; i < max; i++) /*For every single link Do... */ { //Starts the for condition
      if (AllPageLinks[i].href.match('magnet:') !== null) //If the link is an unprotected magnet link
      { //Starts the if condition
        SavedUnprotectedLinks.push(AllPageLinks[i].href); //Add the unprotected direct magnet link to the array
        SavedUnprotectedLinksIndex.push(i); //Add the unprotected direct magnet index link to the array
      } //Finishes the if condition
    } //Finishes the for condition

    window.onload = function() { //Starts the function when the website finished loading
      var TimesExecuted = 0; //Create a new variable
      for (var i = 0, max = AllPageLinks.length; i < max; i++) /*For every single link Do... */ { //Starts the for condition
        if (SavedUnprotectedLinksIndex.includes(i) === true) //If the current looped a element is found on the SavedUnprotectedLinksIndex array
        { //Starts the if condition
          AllPageLinks[i].href = SavedUnprotectedLinks[TimesExecuted]; //Add the Saved Unprotected Link to AllPageLinks
          TimesExecuted += 1; //Sum the total amount of times that the if condition is true and executed
        } //Finishes the if condition
      } //Finishes the for condition
    }; //Finishes the onload function
  } //Finishes the if condition

  if (top.location.host === 'thepirate-day.org') /*Make sure to run only on thepirate-day.org */ {
    var SavedProtectedLink = document.querySelector("div.entry-content > a").href; //Create a new variable to save the protected link

    window.onload = function() { //Starts the function when the website finished loading
      document.querySelector("div.entry-content > a").removeAttribute("onclick"); //Remove the onclick attribute of the element
      document.querySelector("div.entry-content > a").href = 'javascript:void(0);' //Remove the link of the element
    }; //Finishes the onload function

    document.querySelector("div.entry-content > a").addEventListener("click", async function() { //Starts the onclick advent listener function
      (async () => { //Creates a function to get the unprotected magnet link and Starts the function
        const response = await (await fetch('https://api.allorigins.win/raw?url=' + SavedProtectedLink)).text(); //Fetch
        const newDocument = new DOMParser().parseFromString(response, 'text/html'); //Parses the fetch response

        if (newDocument.querySelectorAll("img.alignnone").length === 1) //If there's only 1 download button
        { //Starts the if condition
          window.open(newDocument.body.innerHTML.match(/['"](magnet.*?)['"]/g)[0].replace(/"/g, ''), "_self"); //Open the unprotected magnet link
        } // Finishes the if condition
        else //If there's more than 1 download button
        { //Starts the else condition
          window.open(SavedProtectedLink, "_blank"); //Open the "protected magnet link"
        } // Finishes the else condition
      })(); //Finishes the async function
    }); //Finishes the onclick advent listener function
  } // Finishes the if condition

})();