Results 1 to 1 of 1

Thread: "include links" - "Full Page Script" - help

  1. #1

    Default "include links" - "Full Page Script" - help

    .
    Hello, I do not speak English, I hope correctly expresses.
    .

    I want to create a "Full Page Script", but there is no option to "include links", ie I want to exclude all the links, and only include links that I want.

    Because I just want to include some sites, such as: hotfile.com, rapidshare.com, imagevenue.com. only these, not all.

    Is there any way to do it?

    with little knowledge of javascript did this:
    PHP Code:
    <script language="javascript">
    // JavaScript Document
    <!-- inicio reescritura de enlaces -->
    var 
    myArray = new Array("imagevenue.com","rapidshare.com"); 
    function 
    LinksExternos() {
        var 
    Externo;
        if (
    document.getElementsByTagName('a')) {
            for (var 
    0; (Externo document.getElementsByTagName('a')[i]); i++) {
                
    //alert("1) verifico el enlace: "+Externo);
                //alert("2) verifico si el enlace no tiene la palabra 'linkbucks': "+Externo);
                
    if (Externo.href.indexOf("linkbucks") == -1){
                    
    //alert("3) No tiene la plabra 'linkbucks': "+Externo);
                    
    for(var 0myArray.lengthj++){
                        
    //alert("4) Verifico si el enlace es del dominio: "+myArray[j]);
                        
    if(Externo.href.indexOf(myArray[j]) != -1){
                            
    //alert("5) Si es del dominio: "+myArray[j]);
                            //Externo.setAttribute('target', '_blank');
                            
    var lin=document.getElementsByTagName('a')[i];
                            
    lin lin.toString().replace("http://"""); 
                            
    Externo.href='http://06dda031.linkbucks.com/url/http://'+lin;
                            
    //alert("6) El nuevo dominio ahora es: "+Externo.href);
                            //alert("Salgo");
                            
    break;
                        } else {
    //alert("5) No es del dominio: "+myArray[j]);
                        
    }
                    }
    //alert("Sali");
                
    } else {//alert("3) Si tiene la palabra 'linkbucks': "+Externo);
                
    }
            
    //alert("Continuo con el siguiente enlace si lo ubiese");
            
    }
        
    //alert("Termine con todos los enlaces");
        
    }
        
    //return alert("Termine con todos los enlaces");
    }
    //setInterval('LinksExternos()',13000);
    <!-- final reescritura de enlaces -->
    LinksExternos();
    </script> 
    but I do not know if this allowed
    Last edited by RhapsodyOfFire; 09-12-2009 at 11:19 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •