File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ body {
18
18
--box-size : 3.6rem ;
19
19
}
20
20
21
+ body {
22
+ color : var (--global-color );
23
+ }
24
+
21
25
.h2-title ,
22
26
.text {
23
27
background : linear-gradient (45deg , # ff6b6b, # feca57, # ff9ff3 );
@@ -128,4 +132,20 @@ dialog {
128
132
dialog ::backdrop {
129
133
-webkit-backdrop-filter : blur (5px );
130
134
backdrop-filter : blur (5px );
135
+ }
136
+
137
+ .wechat {
138
+ display : flex;
139
+ padding : 6rem ;
140
+ flex-direction : column;
141
+ align-items : center;
142
+ }
143
+
144
+ .decoration-line {
145
+ cursor : pointer;
146
+ color : var (--global-color );
147
+ text-decoration-line : underline;
148
+ text-decoration-thickness : 0.2rem ;
149
+ text-decoration-color : var (--global-color );
150
+ text-underline-offset : 0.5rem ;
131
151
}
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const MS_IN_A_YEAR = MS_IN_A_DAY * 365
6
6
7
7
const meettingTime = Date . parse ( "2024-06-22T23:39:00.000Z" )
8
8
const birthdayTime = + new Date ( "2024-11-20" )
9
+ const userAgent = navigator . userAgent . toLowerCase ( )
9
10
10
11
function getDiffTime ( { start, end } ) {
11
12
const diff = end - start
@@ -55,7 +56,18 @@ function handleTimeElement(element) {
55
56
}
56
57
}
57
58
59
+
58
60
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
61
+
62
+ if ( userAgent . includes ( 'micromessenger' ) ) {
63
+ document . body . innerHTML = `
64
+ <div class="wechat text">
65
+ <span>请使用浏览器打开该网页</span>
66
+ <span class="decoration-line">https://www.fwqaq.us/public/favourite/index.html</span>
67
+ </div>
68
+ `
69
+ }
70
+
59
71
const meettingFunction = handleTimeElement ( document . getElementById ( 'meetting' ) )
60
72
const birthdayFunction = handleTimeElement ( document . getElementById ( 'birthday' ) )
61
73
You can’t perform that action at this time.
0 commit comments