From 00408513897ecf7ada0704666ec744cff8cdcb1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=A8=E5=B0=8F=E9=80=8F=E6=98=8E=E3=83=BB=E5=AE=B8?= =?UTF-8?q?=E2=9C=A8?= <1272742391@qq.com> Date: Wed, 26 Jun 2019 14:00:28 +0800 Subject: [PATCH] Update server --- fuckWechat.js | 55 ++++++++++++++------------------------------------- index.html | 2 +- 2 files changed, 16 insertions(+), 41 deletions(-) diff --git a/fuckWechat.js b/fuckWechat.js index 4238542..5000577 100644 --- a/fuckWechat.js +++ b/fuckWechat.js @@ -5,56 +5,31 @@ if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) { var div = document.createElement('div'); div.setAttribute('id', 'fuckWechat'); - var style = document.createAttribute("style"); - div.setAttributeNode(style); div.style.position = 'fixed'; div.style.left = '0'; div.style.top = '0'; div.style.width = '100%'; div.style.height = '100%'; - div.style.textAlign = 'center'; - div.style.backgroundColor = '#f2f2f2'; + 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 = [ - '
', - '', - ' ', - ' ', - '', - '
', - '
', - ' 已停止访问该网页', - '
', - ' 你正在使用微信打开该网页。微信对部分网页恶意屏蔽,为维护自由上网环境,本页面禁止使用微信打开。', - '
', - '
', - '
', - ' 申请恢复访问', - '
', - '
', - ' "Don\'t be evil."', + '
', + '

( ^ω^)

', + '

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

', + '

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

', + '

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

', '
' ].join('\n'); div.innerHTML = divContent; - document.getElementsByTagName("body").item(0).appendChild(div); - - document.getElementById('fakeWechatStyleButton').addEventListener('touchstart', function () { - fakeWechatStyleButton.style.backgroundColor = '#179b16'; - fakeWechatStyleButton.style.color = 'rgba(255, 255, 255, 0.6)'; - }); - document.addEventListener('touchend', function () { - fakeWechatStyleButton.style.backgroundColor = '#1aad19'; - fakeWechatStyleButton.style.color = '#ffffff'; - }); + document.body.innerHTML = ''; + document.body.append(div); } \ No newline at end of file diff --git a/index.html b/index.html index f298c54..e64c14c 100644 --- a/index.html +++ b/index.html @@ -714,7 +714,7 @@ var requestDialog = new mdui.Dialog('#request'); mdui.prompt('公众号文章链接', function (value) { var xhr = new XMLHttpRequest; - xhr.open('GET', 'https://lit-inlet-66876.herokuapp.com/get_article_info.php?url=' + encodeURIComponent(value)); //获取标题和封面的服务器 + xhr.open('GET', 'https://williamkong.xyz/TransparentLC/get_article_info.php?url=' + encodeURIComponent(value)); //获取标题和封面的服务器 xhr.onreadystatechange = function () { if (xhr.readyState == 4) { var result = JSON.parse(xhr.responseText);