summaryrefslogtreecommitdiff
path: root/libs/Comments.php
diff options
context:
space:
mode:
authorEltrac Koalar <hi@guhub.cn>2022-08-21 19:16:53 +0800
committerEltrac Koalar <hi@guhub.cn>2022-08-21 19:16:53 +0800
commitda0a402299d82c40f121c76cd2a627b7af474ea7 (patch)
tree1251cf35143cf8c0ee15de2be81acaf14f3583b9 /libs/Comments.php
parent1cba3c0713fa1c877458dca99243b4685383ece1 (diff)
:bug: Fix: 一个奇怪的问题
Diffstat (limited to 'libs/Comments.php')
-rw-r--r--libs/Comments.php2
1 files changed, 0 insertions, 2 deletions
diff --git a/libs/Comments.php b/libs/Comments.php
index b7eb8f6..fe35d79 100644
--- a/libs/Comments.php
+++ b/libs/Comments.php
@@ -1,8 +1,6 @@
<?php
/**
* 评论反垃圾
- *
- * @access public
*/
function AntiSpam($comment) {
echo '<!--<nocompress>--><script>(function(){var a=document.addEventListener?{add:"addEventListener",focus:"focus",load:"DOMContentLoaded"}:{add:"attachEvent",focus:"onfocus",load:"onload"};var c,d,e,f,b=document.getElementById("'.$comment->respondId.'");null!=b&&(c=b.getElementsByTagName("form"),c.length>0&&(d=c[0],e=d.getElementsByTagName("textarea")[0],f=!1,null!=e&&"text"==e.name&&e[a.add](a.focus,function(){if(!f){var a=document.createElement("input");a.type="hidden",a.name="_",d.appendChild(a),f=!0,a.value='.Typecho_Common::shuffleScriptVar($comment->security->getToken($comment->request->getRequestUrl())).'}})))})();</script><!--</nocompress>-->';