Friday, March 30, 2012

How can I remove the annoying advertisement from a web site hosted by Tiscali?

Important note: Tiscali adds invasive script tags outside your html tag and in doing so it may cause a lot of problems to web applications written in JavaScript, especially in Internet Explorer. E.g. IE will ignore your document DOCTYPE with the result that your pages may not be rendered correctly, especially if you are using HTML5. I have written this page, hoping that they will have more respect for their users and will stop mangling with users' HTML. Anyway, it is your responsibility to use the hack explained here.

Here's how to remove the advertising frame from Tiscali web sites (the ones under web.tiscali.it), which is added automatically by their server, so that you do not have to pay 1 euro per month anymore. If you find this trick useful, please consider making a little donation, using the Paypal button above. Thank you for helping to finance my studies!
<script>
// This is to hide the annoying Tiscali advertising frame
with (top.document.getElementsByTagName('frameset')[0]) {
  window.rescan = window.relink = window.refresh = onload = function() {
    return false;
  };
  rows = '0,*,0';
}
</script>
PS: put this code in every page of your site, inside the <head> tag. A better solution would be to put the code (without the <script></script> tags) in a JavaScript file and then to add the following line inside the <head> section of each page:
<script type="text/javascript" src="invent_an_original_name.js"></script>

Come posso rimuovere il fastidioso banner pubblicitario dai siti web degli utenti di Tiscali?

Ecco come rimuovere il frame pubblicitario dai siti web di Tiscali (quelli sotto web.tiscali.it), che viene aggiunto automaticamente dal loro server, così che non dovrai più pagare 1 euro al mese. Se trovi questo trucchetto utile, per favore lasciami una piccola donazione, usando il tasto Paypal sopra. Grazie per avermi aiutato a finanziare i miei studi!
<script>
// Questo serve a nascondere il fastidioso banner pubblicitario di Tiscali
with (top.document.getElementsByTagName('frameset')[0]) {
  window.rescan = window.relink = window.refresh = onload = function() {
    return false;
  };
  rows = '0,*,0';
}
</script>
PS: questo codice va inserito in tutte le pagine del sito, all'interno del tag <head>. Una soluzione migliore sarebbe di mettere il codice (senza i tag <script></script>) in un file JavaScript e poi aggiungere la seguente linea dentro la sezione <head> di ciascuna pagina:
<script type="text/javascript" src="inventa_un_nome_originale.js"></script>

No comments: