Skip to content

Commit

Permalink
This commit fixes philipbeel#31 and fixes philipbeel#29
Browse files Browse the repository at this point in the history
This commit fixes issue philipbeel#31 with reference to caching and fixes issue
philipbeel#29 to fix the timestamp.
I have also included a minified version.
  • Loading branch information
DanielMcAssey committed Apr 26, 2014
1 parent 7d7b6e2 commit 36fb7f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tweetable.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
opts = $.extend({}, $.fn.tweetable.options, opts);

return this.each(function () {

var act = jQuery(this);
var tweetList = jQuery('<ul class="tweetList">')[opts.position.toLowerCase() + 'To'](act);
var shortMonths = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
Expand All @@ -33,7 +33,7 @@
{
if(window.localStorage)
{
var response = JSON.parse(localStorage.getItem("tweetable"));
var response = JSON.parse(localStorage.getItem("tweetable_"+opts.username));
if(!response)
{
return false;
Expand All @@ -49,7 +49,7 @@
{
if(window.localStorage)
{
var response = JSON.parse(localStorage.getItem("tweetable"));
var response = JSON.parse(localStorage.getItem("tweetable_"+opts.username));

return response.value;
}
Expand All @@ -75,7 +75,7 @@
timestamp: new Date().getTime()
};

localStorage.setItem("tweetable", JSON.stringify(value));
localStorage.setItem("tweetable_"+opts.username, JSON.stringify(value));
}
};

Expand Down Expand Up @@ -110,7 +110,7 @@
var n;
for(n=0; n<=12; n++) {
if(shortMonths[n] === tweet.tweet_date.substr(4, 3)) {
tweetMonthInt = n++;
tweetMonthInt = n+1;
tweetMonth = (tweetMonthInt <= 9) ? '0' + tweetMonthInt : tweetMonthInt ;
}
}
Expand Down
2 changes: 1 addition & 1 deletion tweetable.jquery.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 36fb7f2

Please sign in to comment.