diff options
| author | Eltrac Koalar <hi@guhub.cn> | 2020-07-14 13:48:45 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-14 13:48:45 +0800 |
| commit | 5690f8c59778373553a2a4b96b18900cc41d13b4 (patch) | |
| tree | 80f70438448e1673b22eeccd0cf988b2bb432278 /libs/Comments.php | |
| parent | eb76e462647e334c58890da50b9fc5897de93bd8 (diff) | |
:bug: Fix: 删除不必要的判断
Diffstat (limited to 'libs/Comments.php')
| -rw-r--r-- | libs/Comments.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/Comments.php b/libs/Comments.php index d97b4bc..1e4cb7e 100644 --- a/libs/Comments.php +++ b/libs/Comments.php @@ -16,9 +16,9 @@ class Comments * @access public */ public static function AntiSpam($id, $value) { - if ($comment->options->switch && in_array('html', $comment->options->switch)) { echo '<!--<nocompress>-->'; } + echo '<!--<nocompress>-->'; echo '<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("'.$id.'");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='.$value.'}})))})();</script>'; - if ($comment->options->switch && in_array('html', $comment->options->switch)) { echo '<!--</nocompress>-->'; } + echo '<!--</nocompress>-->'; } /** @@ -48,4 +48,4 @@ class Comments echo ""; } } -}
\ No newline at end of file +} |
