[Linux-Biella] sito motorola

Paul TT linux@ml.bilug.linux.it
Mon Oct 11 17:07:22 CEST 2004


Alessandro Pastore wrote:

>Ciao
>Non riesco a vedere la pagina del V220 sul sito www.motorola.it;
>qualunque browser X utilizzi.
>
>Lo fa anche a voi?
>  
>
si. causa ne e' sto pezzo dello script che gira sul loro sito:
//get the platform
var is_mac = (agt.indexOf("mac")!=-1);
var is_win = (agt.indexOf("win")!=-1);
 
//get the Netscape version
var is_nav  = ((agt.indexOf('mozilla')!=-1) && 
(agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && 
(agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1)); 
var is_nav4 = (is_nav && (is_major == 4)); 
var is_nav4up = (is_nav && (is_major >= 4)); 
 
//get the Internet Explorer version
var is_ie = (agt.indexOf("ie")!=-1) && (agt.indexOf('opera')==-1);  
var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1)); 
var is_ie4up  = (is_ie  && (is_major >= 4)); 
 
//browser and platform detection
if (is_ie4 || is_ie4up || is_nav4up || is_nav4)
 {
  if (is_win)
    {
    //they have windows and are using a suitable browser
    }
    else if (is_mac)
    {
    //they have mac and are using a suitable browser
    }
    else {location = 
"ZDisplayStaticTemplate-Start?templateName=platformerror"} // because 
they don't have a supported platform
}
else {location = 
"ZDisplayStaticTemplate-Start?templateName=browsererror"} //because they 
don't have a supported browser
 
...

>Se si, gli rompiamo un po le balle?
>  
>
si', ma con qualcosa del tipo:
"voevo comprare 100 telefonini v220, ma dopo scariati tentativi di 
vedere le specifiche sul vs sito, non riuscendoci ho optato per degli 
ericsson|markadituascelta. uso mozilla sotto linux, ma sembra che mi 
dica che il mio browser non va bene..."
devo scrivergli io?

-- 
Gli uomini non sospettano
quale terribile carico stiano
trasportando a valle.

public gpg key: gpg --keyserver pgp.mit.edu --recv-key 2E61343C




More information about the Linux mailing list