AlessandroCaputo

Dominio altervista

Mar 28th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <script type="text/javascript">
  2. //<![CDATA[
  3. (function(){
  4. var AlterVista_DOMAIN = "tuodominio.altervista.org";
  5.  
  6. var NEW_DOCUMENT = 0;
  7.  
  8. var protocolhost = location.protocol+"//"+location.host;
  9. addEventListener("message", function(e){
  10. if(new RegExp("[./]"+AlterVista_DOMAIN+"$").test(e.origin) && e.data.type == NEW_DOCUMENT){
  11. document.title = e.data.title;
  12. history.replaceState(null, e.data.title, protocolhost+e.data.pathquery);
  13. }
  14. }, false);
  15. })()
  16. //]]>
  17. </script>
Add Comment
Please, Sign In to add comment