FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


showing Gmail storage counting up in your site





komunikaze
Don't throw anything away.
- Over 2680.xxxxxx megabytes (and counting) of free storage so you'll never need to delete another message.

thats some of message in gmail.com page when we enter.
if you want to show thats 2680.xxxxxx megabytes in your site just drop this java script in your site under <head> tag
Code:
<script type="text/javascript">
<!--
function el(id) {
  if (document.getElementById) {
    return document.getElementById(id);
  } else if (window[id]) {
    return window[id];
  }
  return null;
}

var CP = [
 [ 1128150000000, 2650 ],
 [ 1136102400000, 2680 ],
 [ 1149145200000, 2730 ]

];

var quota;
function updateQuota() {
  if (!quota) {
    return;
  }

  var now = (new Date()).getTime();
  var i;
  for (i = 0; i < CP.length; i++) {
    if (now < CP[i][0]) {
      break;
    }
  }
  if (i == 0) {
    setTimeout(updateQuota, 1000);
  } else if (i == CP.length) {
    quota.innerHTML = CP[i - 1][1];
  } else {
    var ts = CP[i - 1][0];
    var bs = CP[i - 1][1];
    quota.innerHTML = format(((now-ts) / (CP[i][0]-ts) * (CP[i][1]-bs)) + bs);
    setTimeout(updateQuota, 1000);
  }
}

var PAD = '.000000';

function format(num) {
  var str = String(num);
  var dot = str.indexOf('.');
  if (dot < 0) {
     return str + PAD;
  } if (PAD.length > (str.length - dot)) {
    return str + PAD.substring(str.length - dot);
  } else {
    return str.substring(0, dot + PAD.length);
  }
}

//-->
</script>

and....edit this....:
Code:
var CP = [
 [ 1128150000000, 2650 ],
 [ 1136102400000, 2680 ],
 [ 1149145200000, 2730 ]

in this point that can be change by the gmail author

and drop this script in your <body> tag
Code:
GM4il Storage Sudah :<br> <strong><span id=quota>2000</span> MB</strong>
polarBear
And what would be the point of doing it?
Advice: Don't add pointless stuff on your website, it makes it stink.
Related topics
Linux or Windows on your computer?!
Give FRIH$ 5 and get 1 gmail invitation
GMail
My website/video business
Revo-News. All Nintendo All the Time.
I got Yahoo! mail Beta!!!
EveryDNS.net
Free Gmail
CSS styling iframe page
MySQL and DA problems on server 2
uploading kompozer
Has anyone ever used Google Adwords?
earn money online
Downtime on Server 2/3 today
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.