Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.console > #1847628

[OT] abbiamo esperti di script?

From Hum-bug-her <humbugher@yahoomail.nospam.com>
Newsgroups it.comp.console
Subject [OT] abbiamo esperti di script?
Date 2020-05-27 11:23 +0200
Organization Aioe.org NNTP Server
Message-ID <ralbhp$94f$1@gioia.aioe.org> (permalink)

Show all headers | View raw


nell'esempio qui sotto si fa riferimento al sito https://nomesito.it
ma se volessi aggiungere anche un altro dominio, ad esempio 
https://nomesito.com si può fare?
non penso basti duplicare più sotto lo script con un copia e incolla, 
modificando il sito. sarebbe troppo facile.

comunque lo script è questo:

(function () {
    GM.xmlHttpRequest({
    method: "GET",
    url: document.location.href,
    onload: function(response) {
      window.stop();
		  var 
a=response.responseText.indexOf("https://nomesito.cc/index.php?Action");
      //var iframeId=response.responseText.substring(a);
      var b=response.responseText.indexOf('</iframe>',a);
      if(b==-1){
        var b=response.responseText.indexOf('</script>',a);
      }
      var iframeId=response.responseText.substring(a,b-2);
      top.location.href=iframeId;
    }
    });
})();

sperando di aver incollato bene inizio e fine, ipotizzo, magari si può 
aggiungere una riga doppia alla seguente
(var 
a=response.responseText.indexOf("https://nomesito.cc/index.php?Action");) 
dicendo "o, o" in scriptese?

Back to it.comp.console | Previous | Next | Find similar | Unroll thread


Thread

[OT] abbiamo esperti di script? Hum-bug-her <humbugher@yahoomail.nospam.com> - 2020-05-27 11:23 +0200

csiph-web