Permalink
Browse files

update year in footer

  • Loading branch information...
1 parent 2d6a772 commit 94ca002384bb4db72da39bfaafcfbbf11debeddc @msoap committed Nov 18, 2012
Showing with 9 additions and 2 deletions.
  1. +1 −1 index.html
  2. +7 −0 js/script.js
  3. +1 −1 js/script.min.js
View
2 index.html
@@ -86,7 +86,7 @@
<hr>
<footer>
- <p>&copy; 2012</p>
+ <p id="copyright">&copy; 2012</p>
</footer>
<script src="js/libs/ecmascript5.compatibility.min.js"></script>
View
7 js/script.js
@@ -24,6 +24,13 @@ var App = {
if (! window.SVGSVGElement) {
$('img#avatar')[0].src = 'img/avatar.png'
};
+
+ // update year
+ var date = new Date
+ , year = date.getFullYear();
+ if (year > 2000) {
+ $('p#copyright').html("&copy; " + year);
+ };
},
on_init_set_active: function() {
View
2 js/script.min.js
@@ -1 +1 @@
-"use strict";$(function(){App.init()});var App={init:function(){$("div#navbar ul.nav li a").click(App.on_click_navbar),setTimeout(App.on_init_set_active,10),App.on_init_render_github(),App.on_init_render_delicious(),App.on_init_render_github_gists(),App.on_init_render_lastfm(),App.on_init_render_fotkiyandexru(),App.on_init_render_twitter(),App.on_init_render_linkedin(),window.SVGSVGElement||($("img#avatar")[0].src="img/avatar.png")},on_init_set_active:function(){var e=document.location.hash.replace(/^#/,"");e.length&&$("div#"+e).length&&($("div#navbar ul.nav li").removeClass("active"),$("div#navbar ul.nav li a[href=#"+e+"]").parent("li").addClass("active"))},on_click_navbar:function(){$(this).parents("ul").find("li").removeClass("active"),$(this).parent("li").addClass("active")},on_init_render_github:function(){$.getJSON("https://api.github.com/users/msoap/repos?callback=?",{format:"json"},function(e){if(e.meta&&e.meta.status!=200){$("div#github").remove();return}var t={name:"Github repositories:",link_to_all:"https://github.com/msoap",items:e.data.map(function(e){var t=[];return e.homepage&&e.homepage.length&&t.push({title:"home",url:e.homepage}),t.push({title:"repository",url:e.html_url}),e.has_wiki&&t.push({title:"wiki",url:e.html_url+"/wiki"}),{title:e.description,description:e.description,urls:t,date:(new Date(e.updated_at)).toLocaleDateString()}})};App.render_any("div#github",t,"script#tmpl_links_block_github")})},on_init_render_github_gists:function(){$.getJSON("https://api.github.com/users/msoap/gists?callback=?",{format:"json"},function(e){if(e.meta&&e.meta.status!=200){$("div#github").remove();return}var t={name:"Github gists:",link_to_all:"https://gist.github.com/msoap",items:e.data.map(function(e){var t=e.description;for(var n in e.files){t=n+" — "+e.description;break}return{title:t,description:e.description,url:e.html_url,date:(new Date(e.updated_at)).toLocaleDateString()}})};App.render_any("div#github",t)})},on_init_render_delicious:function(){$.getJSON("http://feeds.delicious.com/v2/json/msoap?callback=?",{},function(e){var t={name:"Last delicious links:",link_to_all:"http://delicious.com/msoap",items:e.map(function(e){return{title:e.d,description:e.n,url:e.u,date:(new Date(e.dt)).toLocaleDateString()}})};App.render_any("div#delicious",t)})},on_init_render_lastfm:function(){$.getJSON("http://ws.audioscrobbler.com/2.0/?callback=?",{method:"user.getRecentTracks",format:"json",user:"msoap",api_key:"f013c46eeee32be481c90eb2c79378c5"},function(e){var t={without_url:!0,name:"Recently Listened Tracks:",link_to_all:"http://www.lastfm.ru/user/msoap",items:e.recenttracks.track.map(function(e){return{title:e.name,description:[e.artist["#text"],e.album["#text"]].join(" / "),url:e.url,date:e.date?(new Date(e.date.uts*1e3)).toLocaleDateString():(new Date).toLocaleDateString()}})};App.render_any("div#lastfm",t)})},on_init_render_fotkiyandexru:function(){$.getJSON("http://api-fotki.yandex.ru/api/users/msoap/photos/?callback=?",{limit:10,format:"json"},function(e){var t={without_url:!0,name:"Last photos:",link_to_all:"http://fotki.yandex.ru/users/msoap/",items:e.entries.filter(function(e,t){return t<15?!0:!1}).map(function(e){return{title:e.title,description:e.description,url:e.links.alternate,date:(new Date(e.published)).toLocaleDateString()}})};App.render_any("div#fotkiyandexru",t)})},on_init_render_twitter:function(){$.getJSON("https://api.twitter.com/1/statuses/user_timeline.json?callback=?",{include_entities:"false",include_rts:"false",screen_name:"msoap",count:10},function(e){var t={without_url:!0,name:"Last twits, one twit per year:)",link_to_all:"http://twitter.com/msoap",items:e.map(function(e){return{title:e.text,description:"",url:"http://twitter.com/#!/msoap/status/"+e.id_str,date:(new Date(e.created_at)).toLocaleDateString()}})};App.render_any("div#twitter",t)})},on_init_render_linkedin:function(){$("div#linkedin_div").append('<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/MemberProfile" data-id="http://www.linkedin.com/in/mudrik" data-format="click" data-related="false"></script>'),$("div#linkedin_div").one("mouseenter mouseleave",function(){$("span.IN-widget a.li-connect-link").append('<span style="color: black; font-size: 70%; text-decoration: none;">Linkedin<span>'),$(this).unbind("mouseenter mouseleave")})},render_any:function(e,t,n){n||(n="script#tmpl_links_block"),$(n).tmpl(t).appendTo(e)}};
+"use strict";$(function(){App.init()});var App={init:function(){$("div#navbar ul.nav li a").click(App.on_click_navbar),setTimeout(App.on_init_set_active,10),App.on_init_render_github(),App.on_init_render_delicious(),App.on_init_render_github_gists(),App.on_init_render_lastfm(),App.on_init_render_fotkiyandexru(),App.on_init_render_twitter(),App.on_init_render_linkedin(),window.SVGSVGElement||($("img#avatar")[0].src="img/avatar.png");var e=new Date,t=e.getFullYear();t>2e3&&$("p#copyright").html("&copy; "+t)},on_init_set_active:function(){var e=document.location.hash.replace(/^#/,"");e.length&&$("div#"+e).length&&($("div#navbar ul.nav li").removeClass("active"),$("div#navbar ul.nav li a[href=#"+e+"]").parent("li").addClass("active"))},on_click_navbar:function(){$(this).parents("ul").find("li").removeClass("active"),$(this).parent("li").addClass("active")},on_init_render_github:function(){$.getJSON("https://api.github.com/users/msoap/repos?callback=?",{format:"json"},function(e){if(e.meta&&e.meta.status!=200){$("div#github").remove();return}var t={name:"Github repositories:",link_to_all:"https://github.com/msoap",items:e.data.map(function(e){var t=[];return e.homepage&&e.homepage.length&&t.push({title:"home",url:e.homepage}),t.push({title:"repository",url:e.html_url}),e.has_wiki&&t.push({title:"wiki",url:e.html_url+"/wiki"}),{title:e.description,description:e.description,urls:t,date:(new Date(e.updated_at)).toLocaleDateString()}})};App.render_any("div#github",t,"script#tmpl_links_block_github")})},on_init_render_github_gists:function(){$.getJSON("https://api.github.com/users/msoap/gists?callback=?",{format:"json"},function(e){if(e.meta&&e.meta.status!=200){$("div#github").remove();return}var t={name:"Github gists:",link_to_all:"https://gist.github.com/msoap",items:e.data.map(function(e){var t=e.description;for(var n in e.files){t=n+" — "+e.description;break}return{title:t,description:e.description,url:e.html_url,date:(new Date(e.updated_at)).toLocaleDateString()}})};App.render_any("div#github",t)})},on_init_render_delicious:function(){$.getJSON("http://feeds.delicious.com/v2/json/msoap?callback=?",{},function(e){var t={name:"Last delicious links:",link_to_all:"http://delicious.com/msoap",items:e.map(function(e){return{title:e.d,description:e.n,url:e.u,date:(new Date(e.dt)).toLocaleDateString()}})};App.render_any("div#delicious",t)})},on_init_render_lastfm:function(){$.getJSON("http://ws.audioscrobbler.com/2.0/?callback=?",{method:"user.getRecentTracks",format:"json",user:"msoap",api_key:"f013c46eeee32be481c90eb2c79378c5"},function(e){var t={without_url:!0,name:"Recently Listened Tracks:",link_to_all:"http://www.lastfm.ru/user/msoap",items:e.recenttracks.track.map(function(e){return{title:e.name,description:[e.artist["#text"],e.album["#text"]].join(" / "),url:e.url,date:e.date?(new Date(e.date.uts*1e3)).toLocaleDateString():(new Date).toLocaleDateString()}})};App.render_any("div#lastfm",t)})},on_init_render_fotkiyandexru:function(){$.getJSON("http://api-fotki.yandex.ru/api/users/msoap/photos/?callback=?",{limit:10,format:"json"},function(e){var t={without_url:!0,name:"Last photos:",link_to_all:"http://fotki.yandex.ru/users/msoap/",items:e.entries.filter(function(e,t){return t<15?!0:!1}).map(function(e){return{title:e.title,description:e.description,url:e.links.alternate,date:(new Date(e.published)).toLocaleDateString()}})};App.render_any("div#fotkiyandexru",t)})},on_init_render_twitter:function(){$.getJSON("https://api.twitter.com/1/statuses/user_timeline.json?callback=?",{include_entities:"false",include_rts:"false",screen_name:"msoap",count:10},function(e){var t={without_url:!0,name:"Last twits, one twit per year:)",link_to_all:"http://twitter.com/msoap",items:e.map(function(e){return{title:e.text,description:"",url:"http://twitter.com/#!/msoap/status/"+e.id_str,date:(new Date(e.created_at)).toLocaleDateString()}})};App.render_any("div#twitter",t)})},on_init_render_linkedin:function(){$("div#linkedin_div").append('<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/MemberProfile" data-id="http://www.linkedin.com/in/mudrik" data-format="click" data-related="false"></script>'),$("div#linkedin_div").one("mouseenter mouseleave",function(){$("span.IN-widget a.li-connect-link").append('<span style="color: black; font-size: 70%; text-decoration: none;">Linkedin<span>'),$(this).unbind("mouseenter mouseleave")})},render_any:function(e,t,n){n||(n="script#tmpl_links_block"),$(n).tmpl(t).appendTo(e)}};

0 comments on commit 94ca002

Please sign in to comment.