TimePage BBCode

Ordinary BBCode Database
BBCodes that need nothing else than installation through ACP
There is no support here! Only Read Access!
Locked
User avatar
BBCode Bot
BBCoder IV
BBCoder IV
Posts: 239
Joined: 04 Mar 2010, 15:04
Location: bbcode table

TimePage BBCode

Post by BBCode Bot »

TimePage BBCode

Author: Morpheus (alias djgalix)
Description: The TimePage BBCode display an alert box when you leave this page
[valid][/valid]

BBCode:

Code: Select all

[timepage][/timepage]
HTML:

Code: Select all

<script type="text/javascript">
NavName = navigator.appName.substring(0,3);
NavVersion = navigator.appVersion.substring(0,1);
if (NavName != "Mic" || NavVersion>=4)
   {
   entree = new Date;
   entree = entree.getTime();
   }
function esortTemp()
   {
   if (NavName != "Mic" || NavVersion>=4)
      {
      sortie = new Date;
sortie = sortie.getTime();
      secondes = Math.floor((sortie-entree)/1000);
      minutes = Math.floor(secondes/60);
      while (secondes>=60)
         {
         secondes = secondes-60;
         }
      alert('You were connected ' + minutes + ' minute(s) and ' + secondes + ' seconde(s) on this page!')      }
   }
window.onunload = esortTemp
</script>
Helpline:

Code: Select all

Timepage: [timepage][/timepage]
Example:

Code: Select all

[timepage][/timepage]
Demo:
[timepage][/timepage]
(you will see when you leave this page)
Locked