diff --git a/fuckWechat.js b/fuckWechat.js index 5000577..e55102e 100644 --- a/fuckWechat.js +++ b/fuckWechat.js @@ -4,31 +4,13 @@ if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) { var div = document.createElement('div'); div.setAttribute('id', 'fuckWechat'); - - div.style.position = 'fixed'; - div.style.left = '0'; - div.style.top = '0'; - div.style.width = '100%'; - div.style.height = '100%'; - div.style.boxSizing = 'border-box'; - div.style.padding = '18px'; - div.style.fontSize = '18px'; - div.style.lineHeight = '1.5em'; - div.style.backgroundColor = '#fff'; - div.style.zIndex = '2147483647'; - div.style.display = 'flex'; - div.style.justifyContent = 'center'; - div.style.alignItems = 'center'; - - var divContent = [ - '
', - '

( ^ω^)

', - '

我们刚刚做了一个非常艰难的决定,在张小龙先生真正学会怎么做产品之前,这个网页不允许使用微信内置浏览器打开。

', - '

请点击右上角,选择“在浏览器打开”。

', - '

你为什么还要坚持使用这个功能残缺,体验极差的社交软件?

', - '
' - ].join('\n'); - div.innerHTML = divContent; + div.style.cssText = 'position: fixed; left: 0; top: 0; width: 100%; height: 100%; box-sizing: border-box; padding: 18px; font-size: 18px; line-height: 1.5em; background-color: #fff; z-index: 2147483647; display: flex; justify-content: center; align-items: center;' + div.innerHTML = '' + + '
' + + '

( ^ω^)

' + + '

我们刚刚做了一个非常艰难的决定,这个网页不允许使用微信内置浏览器打开。为什么这样做?

' + + '

请点击右上角,选择“在浏览器打开”。

' + + '
'; document.body.innerHTML = ''; document.body.append(div); diff --git a/get_article_info.php b/get_article_info.php index a9920ff..0fa8e9c 100644 --- a/get_article_info.php +++ b/get_article_info.php @@ -64,5 +64,5 @@ if (!empty($result['cover'])) { } $result['success'] = !empty($result['title']) && !empty($result['cover']); -echo json_encode($result); +echo json_encode($result, JSON_UNESCAPED_UNICODE); ?> \ No newline at end of file diff --git a/index.html b/index.html index eba87ee..fa11c62 100644 --- a/index.html +++ b/index.html @@ -703,7 +703,6 @@ - +