11//this is auto generated by [npm run dev/build] command
22const nowHost = window . location . host ;
33if ( nowHost === 'annom.com' ) {
4+ function parseTime ( testTime ) {
5+ const a = testTime . split ( ' ' ) ;
6+ const result = {
7+ y : 0 , m : 0 , d : 0 , h : 0 , mi : 0 , s : 0 ,
8+ } ;
9+ if ( a . length >= 2 ) {
10+ const ymd = a [ 0 ] . split ( '-' ) ;
11+ result . y = Number ( ymd [ 0 ] ) ;
12+ result . m = Number ( ymd [ 1 ] ) ;
13+ result . d = Number ( ymd [ 2 ] ) ;
14+ const hms = a [ 1 ] . split ( ':' ) ;
15+ result . h = Number ( hms [ 0 ] ) ;
16+ result . mi = Number ( hms [ 1 ] ) ;
17+ result . s = Number ( hms [ 2 ] ) ;
18+ }
19+ return result ;
20+ }
21+
422setInterval ( ( ) => {
523 const list = document . getElementsByClassName ( 'content' ) ;
624 if ( list . length === 3 ) {
@@ -17,7 +35,8 @@ setInterval(() => {
1735 const timeValueS = timeValue . split ( ' ' ) ;
1836 if ( timeValueS . length === 3 && timeValueS [ 2 ] === 'PST' ) {
1937 const re = parseTime ( timeValue ) ;
20- const stamp = new Date ( re . y , re . m - 1 , re . d , re . h , re . mi , re . s ) . getTime ( ) / 1000 + 16 * 3600 ;
38+ const stamp = new Date ( re . y , re . m - 1 , re . d , re . h , re . mi , re . s ) . getTime ( )
39+ / 1000 + 16 * 3600 ;
2140 j [ i ] . innerText = new Date ( stamp * 1000 ) . toLocaleString ( ) ;
2241 }
2342 }
@@ -26,23 +45,6 @@ setInterval(() => {
2645 }
2746 }
2847} , 1000 ) ;
29- function parseTime ( testTime ) {
30- const a = testTime . split ( ' ' ) ;
31- const result = {
32- y : 0 , m : 0 , d : 0 , h : 0 , mi : 0 , s : 0 ,
33- } ;
34- if ( a . length >= 2 ) {
35- const ymd = a [ 0 ] . split ( '-' ) ;
36- result . y = Number ( ymd [ 0 ] ) ;
37- result . m = Number ( ymd [ 1 ] ) ;
38- result . d = Number ( ymd [ 2 ] ) ;
39- const hms = a [ 1 ] . split ( ':' ) ;
40- result . h = Number ( hms [ 0 ] ) ;
41- result . mi = Number ( hms [ 1 ] ) ;
42- result . s = Number ( hms [ 2 ] ) ;
43- }
44- return result ;
45- }
4648}
4749if ( nowHost === 'blog.csdn.net' ) {
4850// 设置csdn烦人的【展开阅读全文】、【弹出登录】功能
0 commit comments