cansin-blogdata 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/Emotion/Bilibili/b01.gif +0 -0
  2. package/Emotion/Bilibili/b02.gif +0 -0
  3. package/Emotion/Bilibili/b03.gif +0 -0
  4. package/Emotion/Bilibili/b04.gif +0 -0
  5. package/Emotion/Bilibili/b05.gif +0 -0
  6. package/Emotion/Bilibili/b06.gif +0 -0
  7. package/Emotion/Bilibili/b07.gif +0 -0
  8. package/Emotion/Bilibili/b08.gif +0 -0
  9. package/Emotion/Bilibili/b09.gif +0 -0
  10. package/Emotion/Bilibili/b10.gif +0 -0
  11. package/Emotion/Bilibili/b11.gif +0 -0
  12. package/Emotion/Bilibili/b12.gif +0 -0
  13. package/Emotion/Bilibili/b13.gif +0 -0
  14. package/Emotion/Bilibili/b14.gif +0 -0
  15. package/Emotion/Bilibili/b15.gif +0 -0
  16. package/Emotion/Bilibili/b16.gif +0 -0
  17. package/Emotion/Bilibili/b17.gif +0 -0
  18. package/Emotion/Bilibili/b18.gif +0 -0
  19. package/Emotion/Bilibili/b19.gif +0 -0
  20. package/Emotion/Bilibili/b20.gif +0 -0
  21. package/Emotion/Bilibili/b21.gif +0 -0
  22. package/Emotion/Bilibili/b22.gif +0 -0
  23. package/Emotion/Bilibili/b23.gif +0 -0
  24. package/Emotion/Bilibili/b24.gif +0 -0
  25. package/Emotion/Bilibili/b25.gif +0 -0
  26. package/Emotion/Bilibili/b26.gif +0 -0
  27. package/Emotion/Bilibili/b27.gif +0 -0
  28. package/Emotion/Bilibili/b28.gif +0 -0
  29. package/Emotion/Bilibili/b29.gif +0 -0
  30. package/Emotion/Bilibili/b30.gif +0 -0
  31. package/Emotion/Bilibili/b31.gif +0 -0
  32. package/Emotion/Bilibili/b32.gif +0 -0
  33. package/Emotion/Bilibili/b33.gif +0 -0
  34. package/Emotion/Bilibili/b34.gif +0 -0
  35. package/Emotion/Bilibili/b35.gif +0 -0
  36. package/Emotion/Bilibili/b36.gif +0 -0
  37. package/Emotion/Bilibili/b37.gif +0 -0
  38. package/Emotion/Bilibili/b38.gif +0 -0
  39. package/Emotion/Bilibili/b39.gif +0 -0
  40. package/Emotion/Bilibili/b40.gif +0 -0
  41. package/Emotion/Bilibili/b41.gif +0 -0
  42. package/Emotion/Bilibili/b42.gif +0 -0
  43. package/Emotion/QQ/s0.gif +0 -0
  44. package/Emotion/QQ/s1.gif +0 -0
  45. package/Emotion/QQ/s10.gif +0 -0
  46. package/Emotion/QQ/s100.gif +0 -0
  47. package/Emotion/QQ/s101.gif +0 -0
  48. package/Emotion/QQ/s102.gif +0 -0
  49. package/Emotion/QQ/s103.gif +0 -0
  50. package/Emotion/QQ/s104.gif +0 -0
  51. package/Emotion/QQ/s105.gif +0 -0
  52. package/Emotion/QQ/s106.gif +0 -0
  53. package/Emotion/QQ/s107.gif +0 -0
  54. package/Emotion/QQ/s108.gif +0 -0
  55. package/Emotion/QQ/s109.gif +0 -0
  56. package/Emotion/QQ/s11.gif +0 -0
  57. package/Emotion/QQ/s110.gif +0 -0
  58. package/Emotion/QQ/s111.gif +0 -0
  59. package/Emotion/QQ/s112.gif +0 -0
  60. package/Emotion/QQ/s113.gif +0 -0
  61. package/Emotion/QQ/s114.gif +0 -0
  62. package/Emotion/QQ/s115.gif +0 -0
  63. package/Emotion/QQ/s116.gif +0 -0
  64. package/Emotion/QQ/s117.gif +0 -0
  65. package/Emotion/QQ/s118.gif +0 -0
  66. package/Emotion/QQ/s119.gif +0 -0
  67. package/Emotion/QQ/s12.gif +0 -0
  68. package/Emotion/QQ/s120.gif +0 -0
  69. package/Emotion/QQ/s121.gif +0 -0
  70. package/Emotion/QQ/s122.gif +0 -0
  71. package/Emotion/QQ/s123.gif +0 -0
  72. package/Emotion/QQ/s124.png +0 -0
  73. package/Emotion/QQ/s125.gif +0 -0
  74. package/Emotion/QQ/s126.gif +0 -0
  75. package/Emotion/QQ/s127.gif +0 -0
  76. package/Emotion/QQ/s128.gif +0 -0
  77. package/Emotion/QQ/s129.gif +0 -0
  78. package/Emotion/QQ/s13.gif +0 -0
  79. package/Emotion/QQ/s130.gif +0 -0
  80. package/Emotion/QQ/s131.gif +0 -0
  81. package/Emotion/QQ/s132.gif +0 -0
  82. package/Emotion/QQ/s133.gif +0 -0
  83. package/Emotion/QQ/s134.gif +0 -0
  84. package/Emotion/QQ/s135.gif +0 -0
  85. package/Emotion/QQ/s136.png +0 -0
  86. package/Emotion/QQ/s137.png +0 -0
  87. package/Emotion/QQ/s138.png +0 -0
  88. package/Emotion/QQ/s14.gif +0 -0
  89. package/Emotion/QQ/s140.png +0 -0
  90. package/Emotion/QQ/s141.png +0 -0
  91. package/Emotion/QQ/s142.png +0 -0
  92. package/Emotion/QQ/s143.png +0 -0
  93. package/Emotion/QQ/s144.png +0 -0
  94. package/Emotion/QQ/s145.png +0 -0
  95. package/Emotion/QQ/s146.png +0 -0
  96. package/Emotion/QQ/s147.png +0 -0
  97. package/Emotion/QQ/s148.png +0 -0
  98. package/Emotion/QQ/s149.png +0 -0
  99. package/Emotion/QQ/s15.png +0 -0
  100. package/Emotion/QQ/s150.png +0 -0
  101. package/Emotion/QQ/s151.png +0 -0
  102. package/Emotion/QQ/s152.png +0 -0
  103. package/Emotion/QQ/s153.png +0 -0
  104. package/Emotion/QQ/s154.png +0 -0
  105. package/Emotion/QQ/s155.png +0 -0
  106. package/Emotion/QQ/s156.png +0 -0
  107. package/Emotion/QQ/s157.png +0 -0
  108. package/Emotion/QQ/s158.png +0 -0
  109. package/Emotion/QQ/s159.png +0 -0
  110. package/Emotion/QQ/s16.gif +0 -0
  111. package/Emotion/QQ/s160.png +0 -0
  112. package/Emotion/QQ/s161.png +0 -0
  113. package/Emotion/QQ/s162.png +0 -0
  114. package/Emotion/QQ/s163.png +0 -0
  115. package/Emotion/QQ/s164.png +0 -0
  116. package/Emotion/QQ/s165.png +0 -0
  117. package/Emotion/QQ/s166.png +0 -0
  118. package/Emotion/QQ/s167.png +0 -0
  119. package/Emotion/QQ/s168.png +0 -0
  120. package/Emotion/QQ/s169.png +0 -0
  121. package/Emotion/QQ/s170.png +0 -0
  122. package/Emotion/QQ/s171.gif +0 -0
  123. package/Emotion/QQ/s172.gif +0 -0
  124. package/Emotion/QQ/s173.gif +0 -0
  125. package/Emotion/QQ/s174.gif +0 -0
  126. package/Emotion/QQ/s175.gif +0 -0
  127. package/Emotion/QQ/s176.gif +0 -0
  128. package/Emotion/QQ/s177.gif +0 -0
  129. package/Emotion/QQ/s178.gif +0 -0
  130. package/Emotion/QQ/s179.gif +0 -0
  131. package/Emotion/QQ/s18.gif +0 -0
  132. package/Emotion/QQ/s180.gif +0 -0
  133. package/Emotion/QQ/s181.gif +0 -0
  134. package/Emotion/QQ/s182.gif +0 -0
  135. package/Emotion/QQ/s183.gif +0 -0
  136. package/Emotion/QQ/s184.gif +0 -0
  137. package/Emotion/QQ/s185.gif +0 -0
  138. package/Emotion/QQ/s186.gif +0 -0
  139. package/Emotion/QQ/s187.gif +0 -0
  140. package/Emotion/QQ/s188.gif +0 -0
  141. package/Emotion/QQ/s189.gif +0 -0
  142. package/Emotion/QQ/s19.gif +0 -0
  143. package/Emotion/QQ/s190.gif +0 -0
  144. package/Emotion/QQ/s191.gif +0 -0
  145. package/Emotion/QQ/s192.gif +0 -0
  146. package/Emotion/QQ/s193.png +0 -0
  147. package/Emotion/QQ/s194.gif +0 -0
  148. package/Emotion/QQ/s195.gif +0 -0
  149. package/Emotion/QQ/s196.gif +0 -0
  150. package/Emotion/QQ/s197.gif +0 -0
  151. package/Emotion/QQ/s198.gif +0 -0
  152. package/Emotion/QQ/s199.gif +0 -0
  153. package/Emotion/QQ/s2.gif +0 -0
  154. package/Emotion/QQ/s20.gif +0 -0
  155. package/Emotion/QQ/s200.gif +0 -0
  156. package/Emotion/QQ/s201.gif +0 -0
  157. package/Emotion/QQ/s202.gif +0 -0
  158. package/Emotion/QQ/s203.gif +0 -0
  159. package/Emotion/QQ/s204.gif +0 -0
  160. package/Emotion/QQ/s205.gif +0 -0
  161. package/Emotion/QQ/s206.gif +0 -0
  162. package/Emotion/QQ/s207.gif +0 -0
  163. package/Emotion/QQ/s208.gif +0 -0
  164. package/Emotion/QQ/s209.gif +0 -0
  165. package/Emotion/QQ/s21.gif +0 -0
  166. package/Emotion/QQ/s210.gif +0 -0
  167. package/Emotion/QQ/s211.gif +0 -0
  168. package/Emotion/QQ/s212.gif +0 -0
  169. package/Emotion/QQ/s213.gif +0 -0
  170. package/Emotion/QQ/s214.gif +0 -0
  171. package/Emotion/QQ/s215.gif +0 -0
  172. package/Emotion/QQ/s216.gif +0 -0
  173. package/Emotion/QQ/s217.gif +0 -0
  174. package/Emotion/QQ/s218.gif +0 -0
  175. package/Emotion/QQ/s219.gif +0 -0
  176. package/Emotion/QQ/s22.gif +0 -0
  177. package/Emotion/QQ/s220.gif +0 -0
  178. package/Emotion/QQ/s221.gif +0 -0
  179. package/Emotion/QQ/s222.gif +0 -0
  180. package/Emotion/QQ/s223.gif +0 -0
  181. package/Emotion/QQ/s224.gif +0 -0
  182. package/Emotion/QQ/s225.gif +0 -0
  183. package/Emotion/QQ/s226.gif +0 -0
  184. package/Emotion/QQ/s227.gif +0 -0
  185. package/Emotion/QQ/s228.gif +0 -0
  186. package/Emotion/QQ/s229.gif +0 -0
  187. package/Emotion/QQ/s23.gif +0 -0
  188. package/Emotion/QQ/s230.gif +0 -0
  189. package/Emotion/QQ/s231.gif +0 -0
  190. package/Emotion/QQ/s232.gif +0 -0
  191. package/Emotion/QQ/s233.gif +0 -0
  192. package/Emotion/QQ/s234.gif +0 -0
  193. package/Emotion/QQ/s235.gif +0 -0
  194. package/Emotion/QQ/s236.gif +0 -0
  195. package/Emotion/QQ/s237.gif +0 -0
  196. package/Emotion/QQ/s238.gif +0 -0
  197. package/Emotion/QQ/s239.gif +0 -0
  198. package/Emotion/QQ/s24.gif +0 -0
  199. package/Emotion/QQ/s240.gif +0 -0
  200. package/Emotion/QQ/s241.gif +0 -0
  201. package/Emotion/QQ/s242.gif +0 -0
  202. package/Emotion/QQ/s243.gif +0 -0
  203. package/Emotion/QQ/s244.gif +0 -0
  204. package/Emotion/QQ/s245.gif +0 -0
  205. package/Emotion/QQ/s246.gif +0 -0
  206. package/Emotion/QQ/s247.gif +0 -0
  207. package/Emotion/QQ/s25.gif +0 -0
  208. package/Emotion/QQ/s26.gif +0 -0
  209. package/Emotion/QQ/s260.png +0 -0
  210. package/Emotion/QQ/s261.gif +0 -0
  211. package/Emotion/QQ/s262.gif +0 -0
  212. package/Emotion/QQ/s263.gif +0 -0
  213. package/Emotion/QQ/s264.gif +0 -0
  214. package/Emotion/QQ/s265.gif +0 -0
  215. package/Emotion/QQ/s266.gif +0 -0
  216. package/Emotion/QQ/s267.gif +0 -0
  217. package/Emotion/QQ/s268.gif +0 -0
  218. package/Emotion/QQ/s269.gif +0 -0
  219. package/Emotion/QQ/s27.gif +0 -0
  220. package/Emotion/QQ/s270.gif +0 -0
  221. package/Emotion/QQ/s271.gif +0 -0
  222. package/Emotion/QQ/s272.gif +0 -0
  223. package/Emotion/QQ/s273.png +0 -0
  224. package/Emotion/QQ/s274.png +0 -0
  225. package/Emotion/QQ/s276.png +0 -0
  226. package/Emotion/QQ/s277.png +0 -0
  227. package/Emotion/QQ/s278.gif +0 -0
  228. package/Emotion/QQ/s279.gif +0 -0
  229. package/Emotion/QQ/s28.gif +0 -0
  230. package/Emotion/QQ/s280.gif +0 -0
  231. package/Emotion/QQ/s281.gif +0 -0
  232. package/Emotion/QQ/s282.gif +0 -0
  233. package/Emotion/QQ/s283.gif +0 -0
  234. package/Emotion/QQ/s284.gif +0 -0
  235. package/Emotion/QQ/s285.gif +0 -0
  236. package/Emotion/QQ/s286.gif +0 -0
  237. package/Emotion/QQ/s287.gif +0 -0
  238. package/Emotion/QQ/s288.gif +0 -0
  239. package/Emotion/QQ/s289.gif +0 -0
  240. package/Emotion/QQ/s29.gif +0 -0
  241. package/Emotion/QQ/s290.gif +0 -0
  242. package/Emotion/QQ/s291.gif +0 -0
  243. package/Emotion/QQ/s292.gif +0 -0
  244. package/Emotion/QQ/s293.gif +0 -0
  245. package/Emotion/QQ/s294.gif +0 -0
  246. package/Emotion/QQ/s295.gif +0 -0
  247. package/Emotion/QQ/s296.gif +0 -0
  248. package/Emotion/QQ/s297.gif +0 -0
  249. package/Emotion/QQ/s298.gif +0 -0
  250. package/Emotion/QQ/s299.gif +0 -0
  251. package/Emotion/QQ/s3.gif +0 -0
  252. package/Emotion/QQ/s30.gif +0 -0
  253. package/Emotion/QQ/s300.gif +0 -0
  254. package/Emotion/QQ/s301.gif +0 -0
  255. package/Emotion/QQ/s302.gif +0 -0
  256. package/Emotion/QQ/s303.gif +0 -0
  257. package/Emotion/QQ/s304.gif +0 -0
  258. package/Emotion/QQ/s305.gif +0 -0
  259. package/Emotion/QQ/s306.png +0 -0
  260. package/Emotion/QQ/s307.png +0 -0
  261. package/Emotion/QQ/s308.gif +0 -0
  262. package/Emotion/QQ/s309.gif +0 -0
  263. package/Emotion/QQ/s31.gif +0 -0
  264. package/Emotion/QQ/s310.gif +0 -0
  265. package/Emotion/QQ/s311.gif +0 -0
  266. package/Emotion/QQ/s312.gif +0 -0
  267. package/Emotion/QQ/s313.gif +0 -0
  268. package/Emotion/QQ/s314.gif +0 -0
  269. package/Emotion/QQ/s315.gif +0 -0
  270. package/Emotion/QQ/s316.gif +0 -0
  271. package/Emotion/QQ/s317.gif +0 -0
  272. package/Emotion/QQ/s318.gif +0 -0
  273. package/Emotion/QQ/s319.gif +0 -0
  274. package/Emotion/QQ/s32.gif +0 -0
  275. package/Emotion/QQ/s320.gif +0 -0
  276. package/Emotion/QQ/s321.gif +0 -0
  277. package/Emotion/QQ/s322.gif +0 -0
  278. package/Emotion/QQ/s323.gif +0 -0
  279. package/Emotion/QQ/s324.gif +0 -0
  280. package/Emotion/QQ/s325.gif +0 -0
  281. package/Emotion/QQ/s326.gif +0 -0
  282. package/Emotion/QQ/s327.png +0 -0
  283. package/Emotion/QQ/s328.png +0 -0
  284. package/Emotion/QQ/s329.png +0 -0
  285. package/Emotion/QQ/s33.gif +0 -0
  286. package/Emotion/QQ/s330.png +0 -0
  287. package/Emotion/QQ/s331.png +0 -0
  288. package/Emotion/QQ/s332.gif +0 -0
  289. package/Emotion/QQ/s333.png +0 -0
  290. package/Emotion/QQ/s334.png +0 -0
  291. package/Emotion/QQ/s335.png +0 -0
  292. package/Emotion/QQ/s336.png +0 -0
  293. package/Emotion/QQ/s337.gif +0 -0
  294. package/Emotion/QQ/s338.gif +0 -0
  295. package/Emotion/QQ/s339.gif +0 -0
  296. package/Emotion/QQ/s34.gif +0 -0
  297. package/Emotion/QQ/s340.gif +0 -0
  298. package/Emotion/QQ/s341.gif +0 -0
  299. package/Emotion/QQ/s342.gif +0 -0
  300. package/Emotion/QQ/s343.gif +0 -0
  301. package/Emotion/QQ/s344.gif +0 -0
  302. package/Emotion/QQ/s345.gif +0 -0
  303. package/Emotion/QQ/s346.gif +0 -0
  304. package/Emotion/QQ/s347.png +0 -0
  305. package/Emotion/QQ/s348.png +0 -0
  306. package/Emotion/QQ/s35.gif +0 -0
  307. package/Emotion/QQ/s36.png +0 -0
  308. package/Emotion/QQ/s37.png +0 -0
  309. package/Emotion/QQ/s38.gif +0 -0
  310. package/Emotion/QQ/s39.gif +0 -0
  311. package/Emotion/QQ/s4.gif +0 -0
  312. package/Emotion/QQ/s41.png +0 -0
  313. package/Emotion/QQ/s42.gif +0 -0
  314. package/Emotion/QQ/s43.gif +0 -0
  315. package/Emotion/QQ/s46.png +0 -0
  316. package/Emotion/QQ/s49.gif +0 -0
  317. package/Emotion/QQ/s5.gif +0 -0
  318. package/Emotion/QQ/s53.gif +0 -0
  319. package/Emotion/QQ/s54.png +0 -0
  320. package/Emotion/QQ/s55.png +0 -0
  321. package/Emotion/QQ/s56.gif +0 -0
  322. package/Emotion/QQ/s57.gif +0 -0
  323. package/Emotion/QQ/s59.gif +0 -0
  324. package/Emotion/QQ/s6.gif +0 -0
  325. package/Emotion/QQ/s60.gif +0 -0
  326. package/Emotion/QQ/s61.png +0 -0
  327. package/Emotion/QQ/s63.png +0 -0
  328. package/Emotion/QQ/s64.png +0 -0
  329. package/Emotion/QQ/s66.png +0 -0
  330. package/Emotion/QQ/s67.gif +0 -0
  331. package/Emotion/QQ/s69.png +0 -0
  332. package/Emotion/QQ/s7.gif +0 -0
  333. package/Emotion/QQ/s74.png +0 -0
  334. package/Emotion/QQ/s75.png +0 -0
  335. package/Emotion/QQ/s76.gif +0 -0
  336. package/Emotion/QQ/s77.gif +0 -0
  337. package/Emotion/QQ/s78.gif +0 -0
  338. package/Emotion/QQ/s79.gif +0 -0
  339. package/Emotion/QQ/s8.gif +0 -0
  340. package/Emotion/QQ/s85.png +0 -0
  341. package/Emotion/QQ/s86.gif +0 -0
  342. package/Emotion/QQ/s89.png +0 -0
  343. package/Emotion/QQ/s9.gif +0 -0
  344. package/Emotion/QQ/s96.gif +0 -0
  345. package/Emotion/QQ/s97.gif +0 -0
  346. package/Emotion/QQ/s98.gif +0 -0
  347. package/Emotion/QQ/s99.gif +0 -0
  348. package/README.md +9 -0
  349. package/css/APlayer.min.css +3 -0
  350. package/css/app-mplayer.css +1 -0
  351. package/css/fcircle.css +337 -0
  352. package/css/font.min.css +1 -0
  353. package/css/gavin.min.css +1 -0
  354. package/css/index.css +7688 -0
  355. package/font//345/217/202/346/230/237/351/230/201.woff2 +0 -0
  356. package/js/APlayer.min.js +2 -0
  357. package/js/Meting.min.js +1 -0
  358. package/js/Meting2.min.js +110 -0
  359. package/js/app-mplayer.js +1 -0
  360. package/js/countup.min.js +1 -0
  361. package/js/datasheet.min.js +1 -0
  362. package/js/encryption.js +162 -0
  363. package/js/fcircle.js +393 -0
  364. package/js/gavin.min.js +1 -0
  365. package/js/lunar.min.js +1 -0
  366. package/js/main.js +784 -0
  367. package/js/paint.min.js +1 -0
  368. package/js/runtime.min.js +1 -0
  369. package/js/tw_cn.js +124 -0
  370. package/js/universe.js +2 -0
  371. package/js/utils.js +278 -0
  372. package/json/emoji.json +2144 -0
  373. package/package.json +22 -0
@@ -0,0 +1,162 @@
1
+ var _type = document.querySelector(".encryption .select-item.type"),
2
+ _code = document.querySelector(".encryption .select-item.code"),
3
+ _case = document.querySelector(".encryption .select-item.case"),
4
+ _mode = document.querySelector(".encryption .select-item.mode"),
5
+ _pad = document.querySelector(".encryption .select-item.pad"),
6
+ _key = document.querySelector(".encryption .select-item.key"),
7
+ _iv = document.querySelector(".encryption .select-item.iv"),
8
+ textIn = document.querySelector('.encryption .inner'),
9
+ textOut = document.querySelector('.encryption .outer');
10
+ textOut.addEventListener("input", ()=>{
11
+ if (textOut.value == '') {
12
+ textOut.disabled = true;
13
+ textOut.classList.add('lock');
14
+ } else {
15
+ textOut.disabled = false;
16
+ textOut.classList.remove('lock');
17
+ }
18
+ })
19
+ _type.addEventListener('change', ()=>{
20
+ if (_type.value == 'AESEncode') {
21
+ _case.classList.contains('hide') ? null : _case.classList.add('hide'); // 隐藏 大小写
22
+ _code.classList.contains('hide') ? _code.classList.remove('hide') : null; // 显示
23
+ _mode.classList.contains('hide') ? _mode.classList.remove('hide') : null;
24
+ _pad.classList.contains('hide') ? _pad.classList.remove('hide') : null;
25
+ _key.classList.contains('hide') ? _key.classList.remove('hide') : null;
26
+ _iv.classList.contains('hide') ? _iv.classList.remove('hide') : null;
27
+ } else if (_type.value == 'AESDecode') {
28
+ _code.classList.contains('hide') ? null : _code.classList.add('hide'); // 隐藏 编码、大小写
29
+ _case.classList.contains('hide') ? null : _case.classList.add('hide');
30
+ _mode.classList.contains('hide') ? _mode.classList.remove('hide') : null; // 显示
31
+ _pad.classList.contains('hide') ? _pad.classList.remove('hide') : null;
32
+ _key.classList.contains('hide') ? _key.classList.remove('hide') : null;
33
+ _iv.classList.contains('hide') ? _iv.classList.remove('hide') : null;
34
+ } else {
35
+ _code.classList.contains('hide') ? _code.classList.remove('hide') : null; // 显示
36
+ _case.classList.contains('hide') ? _case.classList.remove('hide') : null;
37
+ _mode.classList.contains('hide') ? null : _mode.classList.add('hide'); // 隐藏
38
+ _pad.classList.contains('hide') ? null : _pad.classList.add('hide');
39
+ _key.classList.contains('hide') ? null : _key.classList.add('hide');
40
+ _iv.classList.contains('hide') ? null : _iv.classList.add('hide');
41
+ }
42
+ })
43
+ _mode.addEventListener('change', ()=>{
44
+ if (_mode.value != 'ECB') {
45
+ if (_iv.classList.contains('lock')) {
46
+ _iv.classList.remove('lock');
47
+ _iv.disabled = false;
48
+ };
49
+ } else {
50
+ if (!_iv.classList.contains('lock')) {
51
+ _iv.classList.add('lock');
52
+ _iv.disabled = true;
53
+ };
54
+ }
55
+ })
56
+
57
+ function copyTranscode() {
58
+ textOut.select();
59
+ document.execCommand('copy');
60
+ }
61
+
62
+ function clearTranscode() {
63
+ document.querySelector('.encryption .inner').value = '';
64
+ textOut.value = '';
65
+ textOut.disabled = true;
66
+ textOut.classList.add('lock');
67
+ }
68
+
69
+ function transcode() {
70
+ var a = '',
71
+ b = '',
72
+ __mode = '',
73
+ __pad = '',
74
+ __text = '',
75
+ __key = CryptoJS.enc.Utf8.parse(_key.value),
76
+ __iv = CryptoJS.enc.Utf8.parse(_iv.value);
77
+ switch (_mode.value) {
78
+ case "CBC": __mode = CryptoJS.mode.CBC; break;
79
+ case "CFB": __mode = CryptoJS.mode.CFB; break;
80
+ case "CTR": __mode = CryptoJS.mode.CTR; break;
81
+ case "OFB": __mode = CryptoJS.mode.OFB; break;
82
+ case "ECB": __mode = CryptoJS.mode.ECB; break;
83
+ default: __mode = CryptoJS.mode.CBC;
84
+ }
85
+ switch (_pad.value) {
86
+ case "Pkcs7": __pad = CryptoJS.pad.Pkcs7; break;
87
+ case "Iso97971": __pad = CryptoJS.pad.Iso97971; break;
88
+ case "Iso10126": __pad = CryptoJS.pad.Iso10126; break;
89
+ case "AnsiX923": __pad = CryptoJS.pad.AnsiX923; break;
90
+ case "ZeroPadding": __pad = CryptoJS.pad.ZeroPadding; break;
91
+ case "NoPadding": __pad = CryptoJS.pad.NoPadding; break;
92
+ default: __pad = CryptoJS.pad.Pkcs7;
93
+ }
94
+ switch (_type.value) {
95
+ case "MD5":
96
+ a = CryptoJS.MD5(textIn.value);
97
+ b = _code.value == 'Hex' ? a.toString() : CryptoJS.enc.Base64.stringify(a);
98
+ textOut.value = _case.value == 'Lower' ? b : b.toUpperCase();
99
+ break;
100
+ case "SHA1":
101
+ a = CryptoJS.SHA1(textIn.value);
102
+ b = _code.value == 'Hex' ? a.toString() : CryptoJS.enc.Base64.stringify(a);
103
+ textOut.value = _case.value == 'Lower' ? b : b.toUpperCase();
104
+ break;
105
+ case "SHA3":
106
+ a = CryptoJS.SHA3(textIn.value);
107
+ b = _code.value == 'Hex' ? a.toString() : CryptoJS.enc.Base64.stringify(a);
108
+ textOut.value = _case.value == 'Lower' ? b : b.toUpperCase();
109
+ break;
110
+ case "SHA224":
111
+ a = CryptoJS.SHA224(textIn.value);
112
+ b = _code.value == 'Hex' ? a.toString() : CryptoJS.enc.Base64.stringify(a);
113
+ textOut.value = _case.value == 'Lower' ? b : b.toUpperCase();
114
+ break;
115
+ case "SHA256":
116
+ a = CryptoJS.SHA256(textIn.value);
117
+ b = _code.value == 'Hex' ? a.toString() : CryptoJS.enc.Base64.stringify(a);
118
+ textOut.value = _case.value == 'Lower' ? b : b.toUpperCase();
119
+ break;
120
+ case "SHA384":
121
+ a = CryptoJS.SHA384(textIn.value);
122
+ b = _code.value == 'Hex' ? a.toString() : CryptoJS.enc.Base64.stringify(a);
123
+ textOut.value = _case.value == 'Lower' ? b : b.toUpperCase();
124
+ break;
125
+ case "SHA512":
126
+ a = CryptoJS.SHA512(textIn.value);
127
+ b = _code.value == 'Hex' ? a.toString() : CryptoJS.enc.Base64.stringify(a);
128
+ textOut.value = _case.value == 'Lower' ? b : b.toUpperCase();
129
+ break;
130
+ case "RIPEMD160":
131
+ a = CryptoJS.RIPEMD160(textIn.value);
132
+ b = _code.value == 'Hex' ? a.toString() : CryptoJS.enc.Base64.stringify(a);
133
+ textOut.value = _case.value == 'Lower' ? b : b.toUpperCase();
134
+ break;
135
+ case "AESEncode":
136
+ __text = CryptoJS.enc.Utf8.parse(textIn.value);
137
+ a = CryptoJS.AES.encrypt(__text, __key, { iv: __iv, mode: __mode, padding: __pad });
138
+ b = _code.value == 'Hex' ? CryptoJS.enc.Hex.stringify(a.ciphertext) : a.toString();
139
+ textOut.value = b;
140
+ break;
141
+ case "AESDecode":
142
+ var base64Regex = /^[A-Za-z0-9+/]*={1,2}$/,
143
+ hexRegex = /^(?:[0-9a-fA-F]{4})*$/;
144
+ if (base64Regex.test(textIn.value)) {
145
+ console.log('base64');
146
+ __text = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Base64.parse(textIn.value));
147
+ textOut.value = CryptoJS.AES.decrypt(__text, __key, { iv: __iv, mode: __mode, padding: __pad }).toString(CryptoJS.enc.Utf8);
148
+ break;
149
+ } else if (hexRegex.test(textIn.value)) {
150
+ console.log('hex');
151
+ __text = CryptoJS.enc.Hex.parse(textIn.value);
152
+ textOut.value = CryptoJS.AES.decrypt({ ciphertext: __text }, __key, { iv: __iv, mode: __mode, padding: __pad }).toString(CryptoJS.enc.Utf8);
153
+ break;
154
+ } else {
155
+ console.log('数据错误');
156
+ alert('数据错误');break;
157
+ }
158
+ default: ;
159
+ }
160
+ textOut.disabled = false;
161
+ textOut.classList.remove('lock');
162
+ }
package/js/fcircle.js ADDED
@@ -0,0 +1,393 @@
1
+ /*
2
+ Last Modified time : 20220326 15:38 by https://immmmm.com
3
+ 已适配 FriendCircle 公共库和主库
4
+ */
5
+
6
+ //默认数据
7
+ var fdata = {
8
+ jsonurl: '',
9
+ apiurl: '',
10
+ apipublieurl: 'https://fcircle-pub.rct.cool/', //默认公共库
11
+ initnumber: 24, //首次加载文章数
12
+ stepnumber: 12, //更多加载文章数
13
+ article_sort: 'created', //文章排序 updated or created
14
+ error_img: 'https://blog-hexo-img.oss-cn-shanghai.aliyuncs.com/error-img.webp'
15
+ }
16
+ //可通过 var fdataUser 替换默认值
17
+ if (typeof (fdataUser) !== "undefined") {
18
+ for (var key in fdataUser) {
19
+ if (fdataUser[key]) {
20
+ fdata[key] = fdataUser[key];
21
+ }
22
+ }
23
+ }
24
+ var article_num = '', sortNow = '', UrlNow = '', friends_num = ''
25
+ var container = document.getElementById('cf-container') || document.getElementById('fcircleContainer');
26
+ // 获取本地 排序值、加载apiUrl,实现记忆效果
27
+ var localSortNow = localStorage.getItem("sortNow")
28
+ var localUrlNow = localStorage.getItem("urlNow")
29
+ if (localSortNow && localUrlNow) {
30
+ sortNow = localSortNow
31
+ UrlNow = localUrlNow
32
+ } else {
33
+ sortNow = fdata.article_sort
34
+ if (fdata.jsonurl) {
35
+ UrlNow = fdata.apipublieurl + 'postjson?jsonlink=' + fdata.jsonurl + "&"
36
+ } else if (fdata.apiurl) {
37
+ UrlNow = fdata.apiurl + 'all?'
38
+ } else {
39
+ UrlNow = fdata.apipublieurl + 'all?'
40
+ }
41
+ console.log("当前模式:" + UrlNow)
42
+ localStorage.setItem("urlNow", UrlNow)
43
+ localStorage.setItem("sortNow", sortNow)
44
+ }
45
+ // 打印基本信息
46
+ function loadStatistical(sdata) {
47
+ article_num = sdata.article_num
48
+ friends_num = sdata.friends_num
49
+ var messageBoard = `
50
+ <div id="cf-state" class="cf-new-add">
51
+ <div class="cf-state-data">
52
+ <div class="cf-data-friends" onclick="openToShow()">
53
+ <span class="cf-label">订阅</span>
54
+ <span class="cf-message">${sdata.friends_num}</span>
55
+ </div>
56
+ <div class="cf-data-active" onclick="changeEgg()">
57
+ <span class="cf-label">活跃</span>
58
+ <span class="cf-message">${sdata.active_num}</span>
59
+ </div>
60
+ <div class="cf-data-article" onclick="clearLocal()">
61
+ <span class="cf-label">日志</span>
62
+ <span class="cf-message">${sdata.article_num}</span>
63
+ </div>
64
+ </div>
65
+ <div id="cf-change">
66
+ <span id="cf-change-created" data-sort="created" onclick="changeSort(event)" class="${sortNow == 'created' ? 'cf-change-now' : ''}">Created</span> | <span id="cf-change-updated" data-sort="updated" onclick="changeSort(event)" class="${sortNow == 'updated' ? 'cf-change-now' : ''}" >Updated</span>
67
+ </div>
68
+ </div>
69
+ `;
70
+ var loadMoreBtn = `
71
+ <div id="cf-more" class="cf-new-add" onclick="loadNextArticle()"><i class="fas fa-angle-double-down"></i></div>
72
+ <div id="cf-footer" class="cf-new-add">
73
+ <span id="cf-version-up" onclick="checkVersion()"></span>
74
+ <span class="cf-data-lastupdated">更新于:${sdata.last_updated_time}</span>
75
+ Powered by <a target="_blank" href="https://github.com/Rock-Candy-Tea/hexo-circle-of-friends" target="_blank">FriendCircle</a>
76
+ <br>
77
+ Designed by <a target="_blank" href="https://immmmm.com" target="_blank">林木木</a>
78
+ <br>
79
+ Adapted by <a target="_blank" href="https://gavin-chen.top" target="_blank">南方嘉木</a>
80
+ </div>
81
+ <div id="cf-overlay" class="cf-new-add" onclick="closeShow()"></div>
82
+ <div id="cf-overshow" class="cf-new-add"></div>
83
+ `;
84
+ if (container) {
85
+ container.insertAdjacentHTML('beforebegin', messageBoard);
86
+ container.insertAdjacentHTML('afterend', loadMoreBtn);
87
+ }
88
+ }
89
+ // 打印文章内容 cf-article <span class="cf-article-floor">${item.floor}</span>
90
+ function loadArticleItem(datalist, start, end) {
91
+ var articleItem = '';
92
+ var articleNum = article_num;
93
+ var endFor = end
94
+ if (end > articleNum) { endFor = articleNum }
95
+ if (start < articleNum) {
96
+ for (var i = start; i < endFor; i++) {
97
+ var item = datalist[i];
98
+ var id = "cf-" + CryptoJS.MD5(item.link).toString();
99
+ articleItem += `
100
+ <div class="cf-article ${id}">
101
+ <a class="cf-article-title" href="${item.link}" target="_blank" rel="noopener nofollow" data-title="${item.title}">${item.title}</a>
102
+ <a class="cf-star" onclick="switchSecretInput(event)"><i class="fa-regular fa-star"></i></a>
103
+ <div class="cf-article-avatar no-lightbox flink-item-icon">
104
+ <img class="cf-img-avatar avatar" src="${item.avatar}" alt="avatar" onerror="this.src='${fdata.error_img}'; this.onerror = null;">
105
+ <a onclick="openMeShow(event)" data-link="${item.link}" class="" target="_blank" rel="noopener nofollow" href="javascript:;"><span class="cf-article-author">${item.author}</span></a>
106
+ </div>
107
+ <span class="cf-article-time">
108
+ <span class="cf-time-created" style="${sortNow == 'created' ? '' : 'display:none'}">${item.created}</span>
109
+ <span class="cf-time-updated" style="${sortNow == 'updated' ? '' : 'display:none'}">${item.updated}</span>
110
+ </span>
111
+ </div>
112
+ `;
113
+ }
114
+ container.insertAdjacentHTML('beforeend', articleItem);
115
+ if (savedArticlesIndex != null) {checkStared(savedArticlesIndex);}
116
+ // 预载下一页文章
117
+ fetchNextArticle()
118
+ } else {
119
+ // 文章加载到底
120
+ document.getElementById('cf-more').outerHTML = `<div id="cf-more" class="cf-new-add" onclick="loadNoArticle()"><small>一切皆有尽头!</small></div>`
121
+ }
122
+ }
123
+ // 打印个人卡片 cf-overshow
124
+ function loadFcircleShow(userinfo, articledata) {
125
+ var showHtml = `
126
+ <div class="cf-overshow">
127
+ <div class="cf-overshow-head">
128
+ <img class="cf-img-avatar avatar" src="${userinfo.avatar}" alt="avatar" onerror="this.src='${fdata.error_img}'; this.onerror = null;">
129
+ <a class="" target="_blank" rel="noopener nofollow" href="${userinfo.link}">${userinfo.name}</a>
130
+ </div>
131
+ <div class="cf-overshow-content">
132
+ `
133
+ for (var i = 0; i < userinfo.article_num; i++) {
134
+ var item = articledata[i];
135
+ showHtml += `
136
+ <p><a class="cf-article-title" href="${item.link}" target="_blank" rel="noopener nofollow" data-title="${item.title}">${item.title}</a><span>${item.created}</span></p>
137
+ `
138
+ }
139
+ showHtml += '</div></div>'
140
+ document.getElementById('cf-overshow').insertAdjacentHTML('beforeend', showHtml);
141
+ document.getElementById('cf-overshow').className = 'cf-show-now';
142
+ }
143
+
144
+ // 预载下一页文章,存为本地数据 nextArticle
145
+ function fetchNextArticle() {
146
+ var start = document.querySelectorAll('#cf-container .cf-article').length
147
+ var end = start + fdata.stepnumber
148
+ var articleNum = article_num;
149
+ if (end > articleNum) {
150
+ end = articleNum
151
+ }
152
+ if (start < articleNum) {
153
+ UrlNow = localStorage.getItem("urlNow")
154
+ var fetchUrl = UrlNow + "rule=" + sortNow + "&start=" + start + "&end=" + end
155
+ //console.log(fetchUrl)
156
+ fetch(fetchUrl)
157
+ .then(res => res.json())
158
+ .then(json => {
159
+ var nextArticle = eval(json.article_data);
160
+ console.log("已预载" + "?rule=" + sortNow + "&start=" + start + "&end=" + end)
161
+ localStorage.setItem("nextArticle", JSON.stringify(nextArticle))
162
+ })
163
+ } else if (start = articleNum) {
164
+ document.getElementById('cf-more').outerHTML = `<div id="cf-more" class="cf-new-add" onclick="loadNoArticle()"><small>一切皆有尽头!</small></div>`
165
+ }
166
+ }
167
+ // 显示下一页文章,从本地缓存 nextArticle 中获取 <span class="cf-article-floor">${item.floor}</span>
168
+
169
+ function loadNextArticle() {
170
+ var nextArticle = JSON.parse(localStorage.getItem("nextArticle"));
171
+ var articleItem = ""
172
+ for (var i = 0; i < nextArticle.length; i++) {
173
+ var item = nextArticle[i];
174
+ var id = "cf-" + CryptoJS.MD5(item.link).toString();
175
+ articleItem += `
176
+ <div class="cf-article ${id}">
177
+ <a class="cf-article-title" href="${item.link}" target="_blank" rel="noopener nofollow" data-title="${item.title}">${item.title}</a>
178
+ <a class="cf-star" onclick="switchSecretInput(event)"><i class="fa-regular fa-star"></i></a>
179
+ <div class="cf-article-avatar no-lightbox flink-item-icon">
180
+ <img class="cf-img-avatar avatar" src="${item.avatar}" alt="avatar" onerror="this.src='${fdata.error_img}'; this.onerror = null;">
181
+ <a onclick="openMeShow(event)" data-link="${item.link}" class="" target="_blank" rel="noopener nofollow" href="javascript:;"><span class="cf-article-author">${item.author}</span></a>
182
+ </div>
183
+ <span class="cf-article-time">
184
+ <span class="cf-time-created" style="${sortNow == 'created' ? '' : 'display:none'}">${item.created}</span>
185
+ <span class="cf-time-updated" style="${sortNow == 'updated' ? '' : 'display:none'}">${item.updated}</span>
186
+ </span>
187
+ </div>
188
+ `;
189
+ }
190
+ container.insertAdjacentHTML('beforeend', articleItem);
191
+ if (savedArticlesIndex != null) {checkStared(savedArticlesIndex);}
192
+ // 同时预载下一页文章
193
+ fetchNextArticle()
194
+ }
195
+ // 没有更多文章
196
+ function loadNoArticle() {
197
+ var articleSortData = sortNow + "ArticleData"
198
+ localStorage.removeItem(articleSortData)
199
+ localStorage.removeItem("statisticalData")
200
+ //localStorage.removeItem("sortNow")
201
+ document.getElementById('cf-more').remove()
202
+ window.scrollTo(0, document.getElementsByClassName('cf-state').offsetTop)
203
+ }
204
+ // 清空本地数据
205
+ function clearLocal() {
206
+ localStorage.removeItem("updatedArticleData")
207
+ localStorage.removeItem("createdArticleData")
208
+ localStorage.removeItem("nextArticle")
209
+ localStorage.removeItem("statisticalData")
210
+ localStorage.removeItem("sortNow")
211
+ localStorage.removeItem("urlNow")
212
+ location.reload();
213
+ }
214
+ //
215
+ function checkVersion() {
216
+ var url = fdata.apiurl + "version"
217
+ fetch(url)
218
+ .then(res => res.json())
219
+ .then(json => {
220
+ console.log(json)
221
+ var nowStatus = json.status, nowVersion = json.current_version, newVersion = json.latest_version
222
+ var versionID = document.getElementById('cf-version-up')
223
+ if (nowStatus == 0) {
224
+ versionID.innerHTML = "当前版本:v" + nowVersion
225
+ } else if (nowStatus == 1) {
226
+ versionID.innerHTML = "发现新版本:v" + nowVersion + " ↦ " + newVersion
227
+ } else {
228
+ versionID.innerHTML = "网络错误,检测失败!"
229
+ }
230
+ })
231
+ }
232
+ // 切换为公共全库
233
+ function changeEgg() {
234
+ //有自定义json或api执行切换
235
+ if (fdata.jsonurl || fdata.apiurl) {
236
+ document.querySelectorAll('.cf-new-add').forEach(el => el.remove());
237
+ localStorage.removeItem("updatedArticleData")
238
+ localStorage.removeItem("createdArticleData")
239
+ localStorage.removeItem("nextArticle")
240
+ localStorage.removeItem("statisticalData")
241
+ container.innerHTML = ""
242
+ UrlNow = localStorage.getItem("urlNow")
243
+ //console.log("新"+UrlNow)
244
+ var UrlNowPublic = fdata.apipublieurl + 'all?'
245
+ if (UrlNow !== UrlNowPublic) { //非完整默认公开库
246
+ changeUrl = fdata.apipublieurl + 'all?'
247
+ } else {
248
+ if (fdata.jsonurl) {
249
+ changeUrl = fdata.apipublieurl + 'postjson?jsonlink=' + fdata.jsonurl + "&"
250
+ } else if (fdata.apiurl) {
251
+ changeUrl = fdata.apiurl + 'all?'
252
+ }
253
+ }
254
+ localStorage.setItem("urlNow", changeUrl)
255
+ FetchFriendCircle(sortNow, changeUrl)
256
+ } else {
257
+ clearLocal()
258
+ }
259
+ }
260
+ // 首次加载文章
261
+ function FetchFriendCircle(sortNow, changeUrl) {
262
+ var end = fdata.initnumber
263
+ var fetchUrl = UrlNow + "rule=" + sortNow + "&start=0&end=" + end
264
+ if (changeUrl) {
265
+ fetchUrl = changeUrl + "rule=" + sortNow + "&start=0&end=" + end
266
+ }
267
+ //console.log(fetchUrl)
268
+ fetch(fetchUrl)
269
+ .then(res => res.json())
270
+ .then(json => {
271
+ var statisticalData = json.statistical_data;
272
+ var articleData = eval(json.article_data);
273
+ var articleSortData = sortNow + "ArticleData";
274
+ loadStatistical(statisticalData);
275
+ loadArticleItem(articleData, 0, end)
276
+ localStorage.setItem("statisticalData", JSON.stringify(statisticalData))
277
+ localStorage.setItem(articleSortData, JSON.stringify(articleData))
278
+ })
279
+ }
280
+ // 点击切换排序
281
+ function changeSort(event) {
282
+ sortNow = event.currentTarget.dataset.sort
283
+ localStorage.setItem("sortNow", sortNow)
284
+ document.querySelectorAll('.cf-new-add').forEach(el => el.remove());
285
+ container.innerHTML = "";
286
+ changeUrl = localStorage.getItem("urlNow")
287
+ //console.log(changeUrl)
288
+ initFriendCircle(sortNow, changeUrl)
289
+ if (fdata.apiurl) {
290
+ checkVersion()
291
+ }
292
+ }
293
+ //查询个人文章列表
294
+ function openMeShow(event) {
295
+ event.preventDefault()
296
+ var parse_url = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/;
297
+ var meLink = event.currentTarget.dataset.link.replace(parse_url, '$1:$2$3')
298
+ console.log(meLink)
299
+ var fetchUrl = ''
300
+ if (fdata.apiurl) {
301
+ fetchUrl = fdata.apiurl + "post?num=5&link=" + meLink
302
+ } else {
303
+ fetchUrl = fdata.apipublieurl + "post?num=5&link=" + meLink
304
+ }
305
+ //console.log(fetchUrl)
306
+ if (noClick == 'ok') {
307
+ noClick = 'no'
308
+ fetchShow(fetchUrl)
309
+ }
310
+ }
311
+ // 关闭 show
312
+ function closeShow() {
313
+ document.getElementById('cf-overlay').className -= 'cf-show-now';
314
+ document.getElementById('cf-overshow').className -= 'cf-show-now';
315
+ document.getElementById('cf-overshow').innerHTML = ''
316
+ }
317
+ // 点击开往
318
+ var noClick = 'ok';
319
+ function openToShow() {
320
+ var fetchUrl = ''
321
+ if (fdata.apiurl) {
322
+ fetchUrl = fdata.apiurl + "post"
323
+ } else {
324
+ fetchUrl = fdata.apipublieurl + "post"
325
+ }
326
+ //console.log(fetchUrl)
327
+ if (noClick == 'ok') {
328
+ noClick = 'no'
329
+ fetchShow(fetchUrl)
330
+ }
331
+ }
332
+ // 展示个人文章列表
333
+ function fetchShow(url) {
334
+ var closeHtml = `
335
+ <div class="cf-overshow-close" onclick="closeShow()"></div>
336
+ `
337
+ document.getElementById('cf-overlay').className = 'cf-show-now';
338
+ document.getElementById('cf-overshow').insertAdjacentHTML('afterbegin', closeHtml);
339
+ console.log("开往" + url)
340
+ fetch(url)
341
+ .then(res => res.json())
342
+ .then(json => {
343
+ //console.log(json)
344
+ noClick = 'ok'
345
+ var statisticalData = json.statistical_data;
346
+ var articleData = eval(json.article_data);
347
+ loadFcircleShow(statisticalData, articleData)
348
+ })
349
+ }
350
+ // 初始化方法,如有本地数据首先调用
351
+ function initFriendCircle(sortNow, changeUrl) {
352
+ var articleSortData = sortNow + "ArticleData";
353
+ var localStatisticalData = JSON.parse(localStorage.getItem("statisticalData"));
354
+ var localArticleData = JSON.parse(localStorage.getItem(articleSortData));
355
+ container.innerHTML = "";
356
+ if (localStatisticalData && localArticleData) {
357
+ loadStatistical(localStatisticalData);
358
+ loadArticleItem(localArticleData, 0, fdata.initnumber)
359
+ console.log("本地数据加载成功")
360
+ var fetchUrl = UrlNow + "rule=" + sortNow + "&start=0&end=" + fdata.initnumber
361
+ fetch(fetchUrl)
362
+ .then(res => res.json())
363
+ .then(json => {
364
+ var statisticalData = json.statistical_data;
365
+ var articleData = eval(json.article_data);
366
+ //获取文章总数与第一篇文章标题
367
+ var localSnum = localStatisticalData.article_num
368
+ var newSnum = statisticalData.article_num
369
+ var localAtile = localArticleData[0].title
370
+ var newAtile = articleData[0].title
371
+ //判断文章总数或文章标题是否一致,否则热更新
372
+ if (localSnum !== newSnum || localAtile !== newAtile) {
373
+ document.getElementById('cf-state').remove()
374
+ document.getElementById('cf-more').remove()
375
+ document.getElementById('cf-footer').remove()
376
+ container.innerHTML = "";
377
+ var articleSortData = sortNow + "ArticleData";
378
+ loadStatistical(statisticalData);
379
+ loadArticleItem(articleData, 0, fdata.initnumber)
380
+ localStorage.setItem("statisticalData", JSON.stringify(statisticalData))
381
+ localStorage.setItem(articleSortData, JSON.stringify(articleData))
382
+ console.log("热更新完成")
383
+ } else {
384
+ console.log("API数据未更新")
385
+ }
386
+ })
387
+ } else {
388
+ FetchFriendCircle(sortNow, changeUrl)
389
+ console.log("第一次加载完成")
390
+ }
391
+ }
392
+ // 执行初始化
393
+ initFriendCircle(sortNow)