Pages

  • Home
This is Mina Patawari's personal blog. anything she post is hers unless stated. Powered by Blogger.
instagram facebook twitter linkedin youtube tumblr

the lazybum named Mina

    • Home
    • motivation
    • travelog
    • covers
     
    yaww~~ haha this is for my dear Fatya Fatyn who've asked me about this this afternoon right after we had lunch. since she asked, so i decided to make a tutorial for her and to those who would want this too. this is my first tutorial so please bear with me if i did something wrong. anyway, if you have any question just ask. i wont bite ;3

    1. click Layout > Add a Gadget Javascript/HTML
    2. copy all this code below and paste it on the Javasricpt/HTML

    <div class="widget"><h4></h4> <div class="textwidget"><p style="text-align: justify;"><script type="text/javascript">

    /***********************************************
    * Display time of last visit script- by JavaScriptKit.com
    * This notice MUST stay intact for use
    * Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and more
    ***********************************************/

    var days = 730; // days until cookie expires = 2 years.
    var lastvisit=new Object();
    var firstvisitmsg="Welcome if this is your first time visiting Meena Kaulitz's blog!";
    lastvisit.subsequentvisitmsg="Thank you for visiting my blog. Your last visit was on <b>[displaydate]</b>";

    lastvisit.getCookie=function(Name){
    var re=new RegExp(Name+"=[^;]+", "i");
    if (document.cookie.match(re))
    return document.cookie.match(re)[0].split("=")[1];
    return'';
    }

    lastvisit.setCookie=function(name, value, days){
    var expireDate = new Date();

    var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days));
    document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
    }

    lastvisit.showmessage = function() {
    var wh = new Date();
    if (lastvisit.getCookie("visitc") == "") {
    lastvisit.setCookie("visitc", wh, days);
    document.write(firstvisitmsg);
    }

    else {
    var lv = lastvisit.getCookie("visitc");
    var lvp = Date.parse(lv);
    var now = new Date();
    now.setTime(lvp);
    var day = new Array("Sun", "Mon", "Tues", "Wed", "Thur", "Fri", "Sat");
    var month = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
    var dd = now.getDate();
    var dy = now.getDay();
    dy = day[dy];
    var mn = now.getMonth();
    mn = month[mn];
    yy = now.getFullYear();
    var hh = now.getHours();
    var ampm = "AM";
    if (hh >= 12) {ampm = "PM"}
    if (hh >12){hh = hh - 12};
    if (hh == 0) {hh = 12}
    if (hh < 10) {hh = "0" + hh};
    var mins = now.getMinutes();
    if (mins < 10) {mins = "0"+ mins}
    var secs = now.getSeconds();
    if (secs < 10) {secs = "0" + secs}
    var dispDate = dy + ", " + mn + " " + dd + ", " + yy + " " + hh + ":" + mins + ":" + secs + " " + ampm
    document.write(lastvisit.subsequentvisitmsg.replace("\[displaydate\]", dispDate))
    }

    lastvisit.setCookie("visitc", wh, days);

    }

    lastvisit.showmessage();


    </script><br />
    <script>
    function GetCookie (name) {
    var arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;
    while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
    return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
    }
    return null;
    }
    function SetCookie (name, value) {
    var argv = SetCookie.arguments;
    var argc = SetCookie.arguments.length;
    var expires = (argc > 2) ? argv[2] : null;
    var path = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;
    var secure = (argc > 5) ? argv[5] : false;
    document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
    }
    function DeleteCookie (name) {
    var exp = new Date();
    exp.setTime (exp.getTime() - 1);
    var cval = GetCookie (name);
    document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
    }
    var expDays = 30;
    var exp = new Date();
    exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
    function amt(){
    var count = GetCookie('count')
    if(count == null) {
    SetCookie('count','1')
    return 1
    }
    else {
    var newcount = parseInt(count) + 1;
    DeleteCookie('count')
    SetCookie('count',newcount,exp)
    return count
    }
    }
    function getCookieVal(offset) {
    var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1)
    endstr = document.cookie.length;
    return unescape(document.cookie.substring(offset, endstr));
    }
    </script>
    <script>
    document.write("You have visited Meena Kaulitz's blog <b>" + amt() + "</b> times. Thank you. Please come again! :D")
    </script></p>
    </div></div>

    *the ones I've highlighted in red color are the words you can customize :)

    3. lastly, Save & View

    credits to WhiteyMommy

    i hope this would work. happy editing ^^
    Continue Reading
    Older
    Stories

    About me



    a wanderer who got lost in the sea of dreams.
    mina patawari, student

    희망이 있는 곳엔 반드시 시련이 있네,
    희망이 있는 곳엔 반드시 절망이 있네,
    우린 절망해야해 그 모든 시련을 위해.
    - 바다 -


    Find me on

    • instagram
    • twitter
    • facebook

    Blog Archive

    • ▼  2019 (3)
      • ▼  April 2019 (1)
        • A Letter to Bangtan
      • ►  January 2019 (2)
    • ►  2017 (3)
      • ►  November 2017 (1)
      • ►  April 2017 (1)
      • ►  January 2017 (1)
    • ►  2016 (2)
      • ►  September 2016 (1)
      • ►  January 2016 (1)
    • ►  2015 (3)
      • ►  December 2015 (3)
    • ►  2014 (9)
      • ►  November 2014 (2)
      • ►  October 2014 (1)
      • ►  September 2014 (3)
      • ►  May 2014 (2)
      • ►  April 2014 (1)
    • ►  2013 (21)
      • ►  December 2013 (3)
      • ►  November 2013 (1)
      • ►  October 2013 (2)
      • ►  September 2013 (4)
      • ►  August 2013 (3)
      • ►  July 2013 (5)
      • ►  February 2013 (3)
    • ►  2012 (17)
      • ►  November 2012 (1)
      • ►  October 2012 (2)
      • ►  July 2012 (1)
      • ►  June 2012 (1)
      • ►  April 2012 (4)
      • ►  March 2012 (3)
      • ►  February 2012 (4)
      • ►  January 2012 (1)
    • ►  2011 (41)
      • ►  December 2011 (13)
      • ►  October 2011 (3)
      • ►  September 2011 (5)
      • ►  July 2011 (2)
      • ►  June 2011 (1)
      • ►  April 2011 (12)
      • ►  March 2011 (1)
      • ►  February 2011 (3)
      • ►  January 2011 (1)
    • ►  2010 (81)
      • ►  December 2010 (5)
      • ►  November 2010 (23)
      • ►  October 2010 (42)
      • ►  September 2010 (9)
      • ►  August 2010 (2)

    Report Abuse

    instagram twitter facebook tumblr youtube

    Created with by BeautyTemplates

    Back to top