This repository has been archived by the owner on Oct 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
microjs-codereading.js
135 lines (130 loc) · 19.4 KB
/
microjs-codereading.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
jQuery(function () {
var readNum = 0;
var readSize = 0;
var totalNum = getTotalNum();
var totalSize = getTotalSize();
jQuery('#results > li').each(function () {
var li = jQuery(this);
var key = 'read_histories';
var read = 'read';
var unread = 'unread';
var readCss = 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAADHmlDQ1BJQ0MgUHJvZmlsZQAAeAGFVN9r01AU/tplnbDhizpnEQk+aJFuZFN0Q5y2a1e6zVrqNrchSJumbVyaxiTtfrAH2YtvOsV38Qc++QcM2YNve5INxhRh+KyIIkz2IrOemzRNJ1MDufe73/nuOSfn5F6g+XFa0xQvDxRVU0/FwvzE5BTf8gFeHEMr/GhNi4YWSiZHQA/Tsnnvs/MOHsZsdO5v36v+Y9WalQwR8BwgvpQ1xCLhWaBpXNR0E+DWie+dMTXCzUxzWKcECR9nOG9jgeGMjSOWZjQ1QJoJwgfFQjpLuEA4mGng8w3YzoEU5CcmqZIuizyrRVIv5WRFsgz28B9zg/JfsKiU6Zut5xCNbZoZTtF8it4fOX1wjOYA1cE/Xxi9QbidcFg246M1fkLNJK4RJr3n7nRpmO1lmpdZKRIlHCS8YlSuM2xp5gsDiZrm0+30UJKwnzS/NDNZ8+PtUJUE6zHF9fZLRvS6vdfbkZMH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CGF0KiByr9OmQKsxGr+Tq6DWe0scOB59gn9YTBMc2cLpC0JQO6Yfhh2OfgjTyjz9BmhEkXturqgfE/pD6Pe10CyT0IvedYme3IHeQ+WYzjSjy3Vfp1iAGMWeGrTXN5efkOBtU/BC/QvACjcgghpdFO2vWpSedFEH1F9G0n7stMi6QH3gnxsfHJNi/bCnToM1cgl9Qmu8O+D769rIjCq1oy9BsrKjlTh6e4X4dM5ehVVrpIQjgCncp4cdTTuXLkcos4bnPY0rhsai/o2Z1JqO3npdlB3cpkDEVmMvRq4ClWJZK6/j4p5/vqNru3/f1RAaNqRo8eLX7nnvTUgZ58AzrE4MYsaTAy3jEM+QglE6jOZ5Z1N2vkr0RdOK2Ejl6WJ82QSU5OHku4Ps55kkH7VGR0uOqakgk+wK4oLS0q1Uk/6JXo6YhZ14yYdL8YY6zw2rl3TQf/FfvnESYKkS30LQKH074J/Eegkf4FOD+bvjWsmD7qN1H/AtiHg1rBc/DdUXhJvmcZcIVcBAzPMbRG8Y6BIdChOLEeHqXdCxhfQds4jF4GbKCuj5UW+Mvh03n2EVBCCu+k77b3iYtNvUiPHcIQ/RUiIxqmTp26mWwURTWC5lE4YabWyTgyD55E+nSH08NOz4VN8J8m/C7rc1gvK+5ig8cOmWNinM6eb9hPWdAp2uTUpUf/tikxqK6TXil9D+RuVkSPRKPQZmx8s363sU5fjwsOGGGHTdY2S1sOgp9wOOrCKR0KO2WwOuAz4A32zuvslULxA/ckxDSwa/E4KXQT6koQpHE9yt6kT1ceXf2/YmU2Qu9kj9UQXtdd5e4HPeiQ6zLKTBDl1N/CiWU4o6+ru4AcQuxb8UHfl1XpsslAt7VCpgIZzF+V/nzyjcepVhzRBw85YqR4k+9+4kHtoZ6GsSqO3NzclpCQkHxCTM8Eo9CsxPFAyh2tUE+LtWJysmf7/az/Hxti8i4+W85bAAAAAElFTkSuQmCC) no-repeat 0';
var url = li.find('a').attr('href');
var current = unread;
var readHistories = JSON.parse(localStorage.getItem(key) || '[]');
jQuery.each(readHistories, function (i, elem) {
if (elem.url === url) {
current = read;
readNum++;
return false;
}
});
jQuery.each(MicroJS, function (i, elem) {
if (elem.url === url && current === read) {
readSize += parseFloat(elem.size.replace('kB', '').trim());
li.find('a').stop().fadeTo(500, 0.4);
return false;
}
});
if (li.find('div.status').length == 0) {
jQuery('<div class="status"></div>').addClass(current).css({
'float': 'left',
'height': '100px',
'width': '52px',
'background': current == read ? readCss : unreadCss
}).prependTo(li).hover(function () {
jQuery('#results > li').not(li.has(this)).stop().fadeTo(500, 0.5);
}, function () {
jQuery('#results > li').not(li.has(this)).stop().fadeTo(500, 1);
}).hover(function() {
jQuery(this).css('cursor', 'pointer');
}, function() {
jQuery(this).css('cursor', 'default');
}).click(function () {
// read, unread
var div = jQuery(this);
var isRead = div.hasClass(read);
var pre = isRead ? read : unread;
var post = isRead ? unread : read;
div.removeClass(pre).addClass(post).css('background', isRead ? unreadCss : readCss);
var readHistories = JSON.parse(localStorage.getItem(key) || '[]');
if (post === read) {
jQuery.each(MicroJS, function (i, elem) {
if (elem.url === url) {
readSize += parseFloat(elem.size.replace('kB', '').trim());
li.find('a').stop().fadeTo(500, 0.4);
return false;
}
});
readNum++;
var readHistory = {
'url': url,
read_date: new Date()
};
readHistories.push(readHistory);
} else {
jQuery.each(readHistories, function (i, elem) {
if (elem.url === url) {
readNum--;
readSize -= getSize(url);
readHistories.splice(i, 1);
li.find('a').stop().fadeTo(500, 1);
return false;
}
});
}
localStorage.setItem(key, JSON.stringify(readHistories));
updateScore(readNum, readSize);
});
}
});
if (jQuery('#score').length == 0) {
jQuery('<div id="score"></div>').css({
'z-index': 10,
'top': '20px',
'right': '20px',
width: '220px',
height: '120px',
padding: '20px',
'font-family': '"Maiden Orange", arial, serif',
'font-size': '36px',
'font-weight': 'normal',
'text-align': 'right',
'-webkit-font-smoothing': 'antialiased',
'text-rendering': 'optimizeLegibility',
background: '-webkit-linear-gradient(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50.01%, rgba(255, 255, 255, 0)), -webkit-linear-gradient(#FF0071, #BB0047)',
'border-radius': '25px',
'overflow': 'hidden',
'position': 'fixed'
}).append('<div style="text-align: center margin: 6px; height: 40px;"">Score</div>').append('<div id="scoreNum" style="margin: 4px; height: 40px;"></div>').append('<div id="scoreSize" style="margin: 4px; height: 40px;"></div>').appendTo(jQuery('body'));
}
updateScore(readNum, readSize);
function getSize(url) {
var size = 0;
jQuery.each(MicroJS, function (i, elem) {
if (elem.url === url) {
size = parseFloat(MicroJS[i].size.replace('kB', '').trim());
return false;
}
});
return size;
}
function updateScore(_readNum, _readSize) {
_readSize = _readSize > 0 ? _readSize : 0;
_readSize = Math.round(_readSize * 10) / 10;
jQuery('#scoreNum').text(_readNum + ' / ' + totalNum);
jQuery('#scoreSize').text(_readSize + ' / ' + totalSize + ' kB');
}
function getTotalNum() {
return jQuery('#results > li').length;
}
function getTotalSize() {
var total = 0;
jQuery('#results > li > a > div.size').each(function(i, elem) {
total += parseFloat(jQuery(elem).text().replace('kB', '').trim());
});
total = Math.round(total * 10) / 10;
return total;
}
});