|
|
@ -218,11 +218,12 @@ function refreshTwistdayReminder() { |
|
|
|
item.find('.twister-user-info').attr('data-screen-name', lucky); |
|
|
|
item.find('.twister-user-info').attr('data-screen-name', lucky); |
|
|
|
item.find('.twister-user-name').attr('href', $.MAL.userUrl(lucky)); |
|
|
|
item.find('.twister-user-name').attr('href', $.MAL.userUrl(lucky)); |
|
|
|
item.find('.twister-user-tag').text('@' +lucky); |
|
|
|
item.find('.twister-user-tag').text('@' +lucky); |
|
|
|
|
|
|
|
itemTwisterday = item.find('.twisterday'); |
|
|
|
|
|
|
|
itemTwisterday.bind('click', (function(e) { replyInitPopup(e, post); }).bind(post)); |
|
|
|
if (typeof(time) !== 'undefined') |
|
|
|
if (typeof(time) !== 'undefined') |
|
|
|
item.find('.twisterday').text(timeGmtToText(time)); |
|
|
|
itemTwisterday.text(timeGmtToText(time)); |
|
|
|
else |
|
|
|
else |
|
|
|
item.find('.twisterday').text(timeGmtToText(post.userpost.time)); |
|
|
|
itemTwisterday.text(timeGmtToText(post.userpost.time)); |
|
|
|
item.find('.twisterday').bind('click', (function(e) { replyInitPopup(e, post); }).bind(post)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getAvatar(lucky, item.find('.twister-user-photo')); |
|
|
|
getAvatar(lucky, item.find('.twister-user-photo')); |
|
|
|
getFullname(lucky, item.find('.twister-user-full')); |
|
|
|
getFullname(lucky, item.find('.twister-user-full')); |
|
|
@ -231,8 +232,7 @@ function refreshTwistdayReminder() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
function removeLuckyFromList(list, post) { |
|
|
|
function removeLuckyFromList(list, post) { |
|
|
|
var lucky = post.userpost.n; |
|
|
|
list.find('[data-screen-name='+post.userpost.n+']').closest('li').remove(); |
|
|
|
list.find('[data-screen-name='+lucky+']').closest('li').remove(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var showUpcomingTimer = ($.Options.getTwistdayReminderShowUpcomingOpt() === 'enable') ? $.Options.getTwistdayReminderShowUpcomingTimerOpt() *3600 : 0; |
|
|
|
var showUpcomingTimer = ($.Options.getTwistdayReminderShowUpcomingOpt() === 'enable') ? $.Options.getTwistdayReminderShowUpcomingTimerOpt() *3600 : 0; |
|
|
@ -246,13 +246,11 @@ function refreshTwistdayReminder() { |
|
|
|
var thatSec; |
|
|
|
var thatSec; |
|
|
|
|
|
|
|
|
|
|
|
posts.sort(function(a,b) { |
|
|
|
posts.sort(function(a,b) { |
|
|
|
if (parseInt(a.userpost.time) > parseInt(b.userpost.time)) |
|
|
|
return (parseInt(a.userpost.time) > parseInt(b.userpost.time)) ? 1 : -1; |
|
|
|
return 1; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < posts.length; i++) { |
|
|
|
for (var i = 0; i < posts.length; i++) { |
|
|
|
|
|
|
|
if (followingUsers.indexOf(posts[i].userpost.n) > -1) { |
|
|
|
d.setTime(0); |
|
|
|
d.setTime(0); |
|
|
|
d.setUTCSeconds(posts[i].userpost.time); |
|
|
|
d.setUTCSeconds(posts[i].userpost.time); |
|
|
|
if (d.getUTCMonth() === todayMonth && d.getUTCDate() === todayDate) { |
|
|
|
if (d.getUTCMonth() === todayMonth && d.getUTCDate() === todayDate) { |
|
|
@ -272,6 +270,7 @@ function refreshTwistdayReminder() { |
|
|
|
removeLuckyFromList(listUpcoming, posts[i]); |
|
|
|
removeLuckyFromList(listUpcoming, posts[i]); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (listCurrent.children().length) |
|
|
|
if (listCurrent.children().length) |
|
|
|
listCurrent.parent().show(); |
|
|
|
listCurrent.parent().show(); |
|
|
|