cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblot...@apache.org
Subject [10/10] docs commit: Adding cookie set on page load. This closes #307.
Date Thu, 20 Aug 2015 01:33:26 GMT
Adding cookie set on page load. This closes #307.


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/c268bc06
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/c268bc06
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/c268bc06

Branch: refs/heads/cordova-website
Commit: c268bc06f139fe8f5b183ce0833d0dd02569ec73
Parents: d53a923
Author: Raghav Katyal <rakatyal@microsoft.com>
Authored: Wed Aug 19 18:10:32 2015 -0700
Committer: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Committed: Wed Aug 19 18:23:35 2015 -0700

----------------------------------------------------------------------
 www/blog/index.html    | 9 +++++++++
 www/static/js/index.js | 7 +------
 2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c268bc06/www/blog/index.html
----------------------------------------------------------------------
diff --git a/www/blog/index.html b/www/blog/index.html
index 223d70c..61f4510 100644
--- a/www/blog/index.html
+++ b/www/blog/index.html
@@ -3,6 +3,15 @@ layout: blog
 title: Apache Cordova Blog
 ---
 
+<script>
+window.onload = function(){
+  setTimeout(function(){
+    var lastPostTime = new Date("{{ site.posts[0].date | date_to_rfc822 }}").getTime();
+    setCookie("visitTime", lastPostTime, 365);
+  }, 2000);
+};
+</script>
+
 <div class="blog">
   <div id="content" class="container">
      <div class="row">

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/c268bc06/www/static/js/index.js
----------------------------------------------------------------------
diff --git a/www/static/js/index.js b/www/static/js/index.js
index 15fff82..a6abc2c 100644
--- a/www/static/js/index.js
+++ b/www/static/js/index.js
@@ -95,11 +95,6 @@ function checkNotification() {
     return new_blog_count;
 }
 
-document.getElementById("blog_button").onclick = function() {
-    var lastPostTime = new Date("{{ site.posts[0].date | date_to_rfc822 }}").getTime();
-    setCookie("visitTime", lastPostTime, 365);
-};
-
 $(document).ready(function () {
     $('.adorner').each(function(i) {
         var blog_time = new Date($(this).attr('blogTime')).getTime();
@@ -108,7 +103,7 @@ $(document).ready(function () {
         }
     });
     var new_blog_count = checkNotification();
-    if(new_blog_count && window.location.pathname != "/blog/") {
+    if(new_blog_count) {
         document.getElementById("new_blog_count").innerHTML = new_blog_count;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message