diff --git a/api/init.php b/api/init.php index c8319cf..92b554f 100644 --- a/api/init.php +++ b/api/init.php @@ -3,7 +3,7 @@ * 获取权限,简单封装常用函数 * * @author fooleap - * @version 2017-07-30 15:09:11 + * @version 2017-07-30 15:43:58 * @link https://github.com/fooleap/disqus-php-api * */ @@ -141,7 +141,7 @@ function curl_post($url, $data){ } function post_format( $post ){ - global $client, $gravatar_cdn, $gravatar_default; + global $client; // 是否是管理员 $isMod = ($post->author->name == DISQUS_USERNAME || $post->author->email == DISQUS_EMAIL ) && $post->author->isAnonymous == false ? true : false; diff --git a/api/postcomment.php b/api/postcomment.php index 23d5816..f0a1d37 100644 --- a/api/postcomment.php +++ b/api/postcomment.php @@ -10,7 +10,7 @@ * @param url 访客网址,可为空 * * @author fooleap - * @version 2017-07-27 20:40:08 + * @version 2017-08-01 07:30:43 * @link https://github.com/fooleap/disqus-php-api * */ @@ -27,6 +27,7 @@ if( $author_email == DISQUS_EMAIL && strpos($session, 'session') !== false ){ $author_email = null; $author_url = null; + $approved = null; } } diff --git a/api/sendemail.php b/api/sendemail.php index 27533e3..e4aad21 100644 --- a/api/sendemail.php +++ b/api/sendemail.php @@ -10,7 +10,7 @@ * @param id 该评论 ID * * @author fooleap - * @version 2017-07-27 20:32:12 + * @version 2017-08-01 07:33:45 * @link https://github.com/fooleap/disqus-php-api * */ @@ -30,7 +30,8 @@ $curl_url = '/api/3.0/posts/details.json?'.http_build_query($fields_data); $data = curl_get($curl_url); $post = post_format($data->response); -$parent_isanon = $data->response->author->isAnonymous; //是否为访客 +//$parent_isanon = $data->response->author->isAnonymous; //是否为访客 +$parent_isMod = $post['isMod']; $parent_email = $data->response->author->email; //被回复邮箱 $parent_name = $post['name']; //被回复人名 $parent_message = $post['message']; //被回复留言 @@ -52,8 +53,8 @@ $content .= $reply_message; $content .= '

查看详情及回复请点击:' . $_POST['title'] . '

'; -use PHPMailer; -if( $parent_isanon ){ +if( !$parent_isMod ){ + use PHPMailer; // 发送邮件 require_once('PHPMailer/class.phpmailer.php'); diff --git a/api/updatecomment.php b/api/updatecomment.php new file mode 100644 index 0000000..f00245d --- /dev/null +++ b/api/updatecomment.php @@ -0,0 +1,57 @@ + + * @version 2017-08-01 06:10:46 + * @link https://github.com/fooleap/disqus-php-api + * + */ +namespace Emojione; +date_default_timezone_set('UTC'); +require_once('init.php'); + +$fields_data = array( + 'api_key' => DISQUS_PUBKEY, + 'post' => $_POST['id'] +); +$curl_url = '/api/3.0/posts/details.json?'.http_build_query($fields_data); +$data = curl_get($curl_url); +$duration = time() - strtotime($data->response->createdAt); + +$output = array(); + +if($data->code !== 0){ + $output = array( + 'code' => 2, + 'response' => '请求方式有误或不存在此 post' + ); + print_r(json_encode($output)); + return; +} + +if( $duration < 1800 ){ + // 三十分钟内 + $post_data = array( + 'api_key' => DISQUS_PUBKEY, + 'post' => $_POST['id'], + 'message' => $_POST['message'] + ); + $curl_url = '/api/3.0/posts/update.json'; + $data = curl_post($curl_url, $post_data); + $output = $data -> code == 0 ? array( + 'code' => $data -> code, + 'response' => post_format($data -> response) + ) : $data; +} else { + // 三十分钟外 + $output = array( + 'code' => 0, + 'response' => '更新失败,留言时间已超过三十分钟' + ); +} + +print_r(json_encode($output)); diff --git a/dist/iDisqus.min.css b/dist/iDisqus.min.css index bb6fcbd..a86f2c2 100644 --- a/dist/iDisqus.min.css +++ b/dist/iDisqus.min.css @@ -1 +1 @@ -.comment{position:relative;font:14px/1.6 Helvetica Neue,Helvetica,Arial,\\5FAE\8F6F\96C5\9ED1,Microsoft YaHei,sans-serif;color:#2a2e2e;margin:5px auto;word-wrap:break-word;padding:0;box-sizing:border-box}.comment#disqus_thread{display:none}.comment a{text-decoration:none}.comment .icon{max-width:20px}.comment *{margin:0;padding:0;box-sizing:border-box}.comment b,.comment strong{font-weight:700;color:#000}.comment :focus{outline:none}.comment abbr[title]{text-decoration:none}.comment .hide,.comment .loading-bg{display:none}.comment.loading{display:block}.comment.loading>*{display:none}.comment.loading .loading-container{margin:20px auto 40px;color:#9d9ea1;text-align:center;display:block;position:relative;height:100px;line-height:40px;width:250px}.comment.loading .loading-container .loading-bg{display:block;-webkit-transform:rotate(-135deg);transform:rotate(-135deg);margin:0 auto}.comment.loading .loading-container:after,.comment.loading .loading-container:before{display:block;position:absolute}.comment.loading .loading-container:before{content:attr(data-tip);top:64px;left:0;width:100%;height:30px;line-height:30px}.comment.loading .loading-container:after{content:"";box-sizing:border-box;width:26px;height:26px;top:20px;left:115px;border-width:3px;border-style:solid;border-color:#9d9ea1 transparent;border-radius:13px;-webkit-transform-origin:50% 50% 0;transform-origin:50% 50% 0;-webkit-animation:disqus-loader-spinner-animation .7s infinite linear;animation:disqus-loader-spinner-animation .7s infinite linear}.comment-box{margin:20px 0}.comment-box,.comment-header{display:-webkit-box;display:-ms-flexbox;display:flex}.comment-header{height:36px;line-height:36px;font-weight:700;font-size:15px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:2px solid #e7e9ee}.comment-header .comment-header-item{color:#656c7a;display:inline-block;border-bottom:2px solid #656c7a;margin-bottom:-2px;padding:0 7px}.comment-header .comment-header-item#comment-link{border-bottom-color:transparent!important}.comment-header .comment-show{position:relative;color:#2a2e2e;cursor:pointer;display:none}.comment-header .comment-header-count,.comment-header .comment-show{width:120px;text-align:center;transition:all .2s ease-in-out;text-transform:capitalize}.comment-header .comment-header-count{display:inline-block}.comment-header .comment-header-count:after{content:" ";display:block;height:2px;position:absolute;bottom:-2px;left:0;right:0;background:#2e9fff}.comment-form{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex:1;flex:1}.placeholder{color:#7f919e;line-height:30px;font-size:12px;position:absolute;top:7px;left:10px;right:9px;white-space:nowrap;text-overflow:ellipsis;cursor:text;overflow:hidden}.comment-form-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border:2px solid #dbdfe4;border-radius:4px;width:100%}.comment-actions,.comment-form-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.comment-actions{background:#f6f8f9;border-radius:0 0 2px 2px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:0;transition:opacity .2s linear;opacity:0;filter:alpha(opacity=0);visibility:hidden}.comment-actions .comment-actions-group{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.comment-actions .comment-actions-input{display:none}.comment-actions .comment-actions-input[type=checkbox]:checked+.comment-actions-label .icon{fill:#1d2f3a}.comment-actions .comment-actions-label{display:inline-block;width:34px;height:34px;cursor:pointer}.comment-actions .comment-actions-label .icon{height:18px;margin:8px;display:inline-block;color:#737474;cursor:pointer;fill:#c2c6cc;transition:all .2s}.comment-actions .comment-actions-label:hover .icon{fill:#1d2f3a!important}.comment-actions .exit{display:none}.comment-actions .emojione-list{cursor:default;position:absolute;opacity:0;filter:alpha(opacity=0);visibility:hidden;list-style:none;width:125px;background-color:#fff;padding:5px 0 0 5px;border-radius:2px;border:2px solid #c2c6cc;bottom:100%;left:-2px;margin-left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.comment-actions .emojione-item{position:relative;height:24px;width:24px;margin:0 5px 5px 0}.comment-actions .emojione-item:before{content:"";display:inline-block;position:absolute;left:0;top:0;bottom:0;right:0;z-index:4}.comment-actions .emojione-item-image{height:24px;width:24px}.comment-actions .comment-actions-input[type=checkbox]:checked+.emojione .emojione-list{opacity:1;filter:alpha(opacity=100);visibility:visible!important}.expanded .comment-image{display:-webkit-box;display:-ms-flexbox;display:flex}.expanded .comment-image .comment-image-progress{position:relative;height:80px;width:0;background:url("https://a.disquscdn.com/next/embed/assets/img/loader.5cc23909da9c4a9874500d7a85c4125f.gif") 50% no-repeat;margin:0 5px;overflow:hidden}.expanded .comment-image .comment-image-progress:before{position:absolute;content:"";display:block;top:55px;bottom:20px;left:0;right:0;height:5px;width:100%;background-color:#dbdfe4}.expanded .comment-image .comment-image-progress .comment-image-loaded{position:absolute;background-color:#7f919e;top:55px;left:0;right:0;bottom:20px;height:5px;width:0}.expanded .comment-image .comment-image-list{list-style:none;display:-webkit-box;display:-ms-flexbox;display:flex}.expanded .comment-image .comment-image-item{height:80px;margin-left:5px;position:relative;border-radius:3px;overflow:hidden}.expanded .comment-image .comment-image-item:before{overflow:hidden;line-height:0;height:0;transition:all .3s;content:"\70B9\51FB\79FB\9664";display:block;text-align:center;position:absolute;bottom:0;left:0;right:0;width:100%;font-size:12px;background-color:rgba(0,0,0,.5);line-height:25px;color:#fff}.expanded .comment-image .comment-image-item:hover:before{height:25px}.expanded .comment-image .comment-image-item .comment-image-object{height:100%;border-radius:3px;overflow:hidden}.expanded .comment-image .comment-image-item.loading .comment-image-object{width:20px;margin:0 30px}.expanded .comment-image .comment-image-item.loading:before{display:none}.comment-form-wrapper.editing+.comment-login{opacity:1;height:auto;margin-top:10px}.comment-form-wrapper.editing .comment-form-textarea{font:14px/16px Helvetica Neue,Helvetica,Arial,\\5FAE\8F6F\96C5\9ED1,Microsoft YaHei;height:74px}.comment-form-wrapper.editing .comment-image{transition:padding-bottom .15s ease-in-out;background-color:rgba(16,48,68,.03)}.comment-form-wrapper.editing .comment-actions{transition:all .2s ease-in-out;border-top:2px solid #dbdfe4;opacity:1;height:36px;filter:alpha(opacity=100);visibility:visible!important}.comment-form-wrapper.editing .comment-actions-form{transition:all .3s .5s;margin:87px -2px -2px}.comment-form-wrapper.editing .comment-form-submit{opacity:1}.comment-form-wrapper.focus{border:2px solid #c2c6cc}.comment-form-wrapper.focus .comment-actions{border-top:2px solid #c2c6cc}.comment-form-wrapper.focus .comment-actions .comment-actions-label .icon{fill:#656c7a}.comment-form-wrapper.focus.expanded .comment-image{border-top:2px solid #c2c6cc}.comment-form-wrapper.expanded .comment-image{border-top:2px solid #dbdfe4;padding:10px 0 8px}.comment-form-wrapper.logged-in .comment-form-submit{border-radius:0 0 4px;transition:none;opacity:1}.comment-form-wrapper.logged-in .comment-actions-form{margin:0;transition:all .5s}.comment-form-wrapper.logged-in+.comment-login{height:0;opacity:0;margin-top:-40px}.comment-form-wrapper.logged-in .exit{display:block}.comment-form-wrapper .comment-form-textarea{width:100%;display:block;border:none;overflow:auto;color:#2a2e2e;cursor:text;resize:none;height:44px;font:18px/30px Helvetica Neue,Helvetica,Arial,\\5FAE\8F6F\96C5\9ED1,Microsoft YaHei;padding:7px;transition:all .2s ease-in-out}.comment-form-wrapper .comment-form-textarea::-webkit-input-placeholder{color:#7f919e}.comment-form-wrapper .comment-form-textarea::-moz-placeholder{color:#7f919e}.comment-form-wrapper .comment-form-alert:not(:empty){background-color:#f05f70;padding:10px;line-height:20px;font-size:13px;font-weight:700;color:#fff;margin:0 -2px;border-top:2px solid #dbdfe4}.comment-actions-form{display:-webkit-box;display:-ms-flexbox;display:flex}.comment-actions-form .comment-form-submit{z-index:1;border:none;opacity:0;margin:-2px;white-space:nowrap;border-radius:4px;height:38px;width:80px;display:inline-block;background-color:rgba(29,47,58,.6);cursor:pointer;line-height:38px}.comment-actions-form .comment-form-submit .icon{margin:9px;fill:#fff;cursor:pointer;width:20px;height:20px}.comment-actions-form .comment-form-submit:hover{background-color:rgba(29,47,58,.75)}.comment-login{display:-webkit-box;display:-ms-flexbox;display:flex;opacity:0;transition:all .5s .2s;height:0;margin:-40px -5px 40px;overflow:hidden;-ms-flex-wrap:wrap;flex-wrap:wrap}.comment-thread-form{text-align:center;color:#656c7a;line-height:32px}.comment-thread-form .comment-form-submit{background-color:rgba(29,47,58,.6);border:none;white-space:nowrap;border-radius:4px;height:38px;width:120px;display:inline-block;cursor:pointer;line-height:38px;margin:10px 0;color:#fff;font-size:15px}.comment-thread-form .comment-form-submit:hover{background-color:rgba(29,47,58,.75)}.comment-form-item{display:-webkit-box;display:-ms-flexbox;display:flex;margin:10px 0}.comment-form-item .comment-form-label{display:block;height:32px;line-height:32px;font-size:14px;color:#656c7a;width:100px;text-align:right;font-weight:700}.comment-form-item .comment-form-textarea{background-color:#fff;border:2px solid #dbdfe4;transition:all .2s linear;padding:2px 10px;border-radius:4px;font-size:14px;height:64px;margin:0 5px;width:30px;line-height:20px;-webkit-box-flex:1;-ms-flex:auto;flex:auto}.comment-form-item .comment-form-textarea:focus{border:2px solid #c2c6cc}.comment-form-input{background-color:#fff;border:2px solid #dbdfe4;transition:all .2s linear;padding:0 10px;border-radius:4px;font-size:14px;height:32px;margin:0 5px;width:30px;line-height:32px;-webkit-box-flex:1;-ms-flex:auto;flex:auto}.comment-form-input::-webkit-input-placeholder{color:#7f919e}.comment-form-input::-moz-placeholder{color:#7f919e}.comment-form-input:focus{border:2px solid #c2c6cc}.comment-form-input[disabled]{color:#656c7a}.comment-list{font-size:14px}.comment-list:empty:after{content:"\6765\505A\7B2C\4E00\4E2A\7559\8A00\7684\4EBA\5427\FF01";display:block;opacity:.6;line-height:80px;text-align:center}.comment-list p{margin:0}.comment-list a{text-decoration:none;color:#0095dd}.comment-list a[href="javascript:void(0);"]{color:#000;cursor:default}.comment-list pre{overflow:hidden;margin:0 0 15px;border-left:4px solid #7f919e;padding:0 0 0 12px}.comment-list code,.comment-list pre{font-size:12px;font-family:monaco,menlo,monospace;line-height:20px}.comment-list code{padding:0 .3em;display:inline-block;vertical-align:top;margin:2px}.comment-list #comment-preview{opacity:.6}.comment-list .comment-item{display:-webkit-box;display:-ms-flexbox;display:flex;padding-top:6px}.comment-list .comment-item-footer,.comment-list .comment-item-header{font-size:13px;line-height:1.2;color:#c2c6cc}.comment-list .comment-item-footer .comment-item-bullet,.comment-list .comment-item-header .comment-item-bullet{padding:0 2px}.comment-list .comment-item-header .comment-item-pname{color:#656c7a}.comment-list .comment-item-header .comment-item-pname .icon{width:12px;height:12px;margin:1px 2px;vertical-align:top;fill:#656c7a}.comment-list .comment-item-header .comment-item-pname:hover{color:#2a2e2e}.comment-list .comment-item-header .comment-item-pname:hover .icon{fill:#656c7a}.comment-list .comment-item-header .comment-item-badge{color:#fff;background:#7f919e;padding:1px 3px;margin:0 2px;font-size:10px;line-height:1.1;font-weight:700;border-radius:3px;display:inline-block}.comment-list .comment-item-header .comment-item-time{font-size:12px;color:#7f919e;word-spacing:-2px;font-weight:400}.comment-list .comment-item-header .comment-item-name{color:#0095dd;font-weight:700}.comment-list .comment-item-header .comment-item-name[href^=javascript]{cursor:text;color:#000}.comment-list .comment-item-footer{padding:5px 0}.comment-list .comment-item-footer .comment-item-delete,.comment-list .comment-item-footer .comment-item-edit,.comment-list .comment-item-footer .comment-item-reply{color:#656c7a;font-weight:500}.comment-list .comment-item-footer .comment-item-delete:hover,.comment-list .comment-item-footer .comment-item-edit:hover,.comment-list .comment-item-footer .comment-item-reply:hover{color:#2a2e2e}.comment-list .comment-item-footer .comment-item-cancel{color:#0095dd;font-weight:700}.comment-list .comment-item-images{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0 -5px;-ms-flex-wrap:wrap;flex-wrap:wrap}.comment-list .comment-item-images .comment-item-imagelink{height:100px;margin:0 5px}.comment-list .comment-item-images .comment-item-image{height:100%}.comment-list .comment-item.transparent{opacity:.4}.comment-list .comment-item-content{padding-top:5px;line-height:24px;font-size:14px}.comment-list .comment-item-content .at{padding-right:4px}.comment-list .comment-item-content .comment-item-content{min-height:20px}.comment-list .comment-item-content img.emojione{vertical-align:top;width:24px;height:24px;margin:0 3px}.comment-list .comment-box{margin-top:6px}.comment-list .comment-avatar,.comment-list .comment-avatar-image,.comment-list .comment-item-children .comment-item-avatar,.comment-list .comment-item-children .comment-item-avatar img{width:36px;height:36px;margin-right:6px}.comment-list .comment-form-textarea{height:32px;padding:5px;line-height:22px;font-size:15px}.comment-list .comment-item-main{-webkit-box-flex:1;-ms-flex:1;flex:1}.comment-list .comment-item-children .comment-item-children .comment-item-children .comment-box,.comment-list .comment-item-children .comment-item-children .comment-item-children .comment-item-children{margin-left:-42px}.comment-loadmore{font-weight:500;display:block;text-align:center;padding:11px 14px;background-color:rgba(29,47,58,.6);color:#fff!important;line-height:1.1;border-radius:3px;transition:background .2s;text-shadow:none}.comment-loadmore:hover{background-color:rgba(29,47,58,.7)}.comment-loadmore.loading{background-color:#edeff2;color:#444!important;cursor:wait}.comment-form-error{position:absolute;background-color:#fff;font-size:14px;padding:10px;line-height:20px;border-radius:3px;box-shadow:0 0 5px 1px rgba(0,0,0,.3);margin-top:40px;margin-left:2px;z-index:10}.comment-form-error:before{width:10px;height:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg);box-shadow:0 0 5px 1px rgba(0,0,0,.3);top:-4px;left:15px}.comment-form-error:after,.comment-form-error:before{content:"";display:block;position:absolute;background-color:#fff}.comment-form-error:after{width:20px;height:12px;top:0;left:10px}.comment-item-children,.comment-list{text-align:left;list-style:none;padding-left:0;margin-left:0;line-height:20px}.comment-avatar,.comment-item-avatar{display:block;width:48px;height:48px;margin-right:12px}.comment-avatar img,.comment-item-avatar img{border-radius:3px;width:48px;height:48px}@-webkit-keyframes disqus-loader-spinner-animation{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes disqus-loader-spinner-animation{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@media screen and (max-width:450px){.comment-item .comment-item-children .comment-box,.comment-item .comment-item-children .comment-item-children{margin-left:0!important}.comment-item .at,.comment-item .comment-avatar,.comment-item .comment-item-children .comment-item-avatar{display:none}.comment-form-input{margin:5px;width:100%}.comment-form-wrapper.editing .comment-actions-form{margin:180px 0 0}.comment-form-wrapper.logged-in .comment-actions-form{margin:0}} \ No newline at end of file +.comment{position:relative;font:14px/1.6 Helvetica Neue,Helvetica,Arial,\\5FAE\8F6F\96C5\9ED1,Microsoft YaHei,sans-serif;color:#2a2e2e;margin:5px auto;word-wrap:break-word;padding:0;box-sizing:border-box}.comment#disqus_thread{display:none}.comment a{text-decoration:none}.comment .icon{max-width:20px}.comment *{margin:0;padding:0;box-sizing:border-box}.comment b,.comment strong{font-weight:700;color:#000}.comment :focus{outline:none}.comment abbr[title]{text-decoration:none}.comment .hide,.comment .loading-bg{display:none}.comment.loading{display:block}.comment.loading>*{display:none}.comment.loading .loading-container{margin:20px auto 40px;color:#9d9ea1;text-align:center;display:block;position:relative;height:100px;line-height:40px;width:250px}.comment.loading .loading-container .loading-bg{display:block;-webkit-transform:rotate(-135deg);transform:rotate(-135deg);margin:0 auto}.comment.loading .loading-container:after,.comment.loading .loading-container:before{display:block;position:absolute}.comment.loading .loading-container:before{content:attr(data-tip);top:64px;left:0;width:100%;height:30px;line-height:30px}.comment.loading .loading-container:after{content:"";box-sizing:border-box;width:26px;height:26px;top:20px;left:115px;border-width:3px;border-style:solid;border-color:#9d9ea1 transparent;border-radius:13px;-webkit-transform-origin:50% 50% 0;transform-origin:50% 50% 0;-webkit-animation:disqus-loader-spinner-animation .7s infinite linear;animation:disqus-loader-spinner-animation .7s infinite linear}.comment-box{margin:20px 0}.comment-box,.comment-header{display:-webkit-box;display:-ms-flexbox;display:flex}.comment-header{height:36px;line-height:36px;font-weight:700;font-size:15px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:2px solid #e7e9ee}.comment-header .comment-header-item{color:#656c7a;display:inline-block;border-bottom:2px solid #656c7a;margin-bottom:-2px;padding:0 7px}.comment-header .comment-header-item#comment-link{border-bottom-color:transparent!important}.comment-header .comment-show{position:relative;color:#2a2e2e;cursor:pointer;display:none}.comment-header .comment-header-count,.comment-header .comment-show{width:120px;text-align:center;transition:all .2s ease-in-out;text-transform:capitalize}.comment-header .comment-header-count{display:inline-block}.comment-header .comment-header-count:after{content:" ";display:block;height:2px;position:absolute;bottom:-2px;left:0;right:0;background:#2e9fff}.comment-form{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex:1;flex:1}.placeholder{color:#7f919e;line-height:30px;font-size:12px;position:absolute;top:7px;left:10px;right:9px;white-space:nowrap;text-overflow:ellipsis;cursor:text;overflow:hidden}.comment-form-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border:2px solid #dbdfe4;border-radius:4px;width:100%}.comment-actions,.comment-form-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.comment-actions{background:#f6f8f9;border-radius:0 0 2px 2px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:0;transition:opacity .2s linear;opacity:0;filter:alpha(opacity=0);visibility:hidden}.comment-actions .comment-actions-group{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.comment-actions .comment-actions-input{display:none}.comment-actions .comment-actions-input[type=checkbox]:checked+.comment-actions-label .icon{fill:#1d2f3a}.comment-actions .comment-actions-label{display:inline-block;width:34px;height:34px;cursor:pointer}.comment-actions .comment-actions-label .icon{height:18px;margin:8px;display:inline-block;color:#737474;cursor:pointer;fill:#c2c6cc;transition:all .2s}.comment-actions .comment-actions-label:hover .icon{fill:#1d2f3a!important}.comment-actions .exit{display:none}.comment-actions .emojione-list{cursor:default;position:absolute;opacity:0;filter:alpha(opacity=0);visibility:hidden;list-style:none;width:125px;background-color:#fff;padding:5px 0 0 5px;border-radius:2px;border:2px solid #c2c6cc;bottom:100%;left:-2px;margin-left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.comment-actions .emojione-item{position:relative;height:24px;width:24px;margin:0 5px 5px 0}.comment-actions .emojione-item:before{content:"";display:inline-block;position:absolute;left:0;top:0;bottom:0;right:0;z-index:4}.comment-actions .emojione-item-image{height:24px;width:24px}.comment-actions .comment-actions-input[type=checkbox]:checked+.emojione .emojione-list{opacity:1;filter:alpha(opacity=100);visibility:visible!important}.expanded .comment-image{display:-webkit-box;display:-ms-flexbox;display:flex}.expanded .comment-image .comment-image-progress{position:relative;height:80px;width:0;background:url("https://a.disquscdn.com/next/embed/assets/img/loader.5cc23909da9c4a9874500d7a85c4125f.gif") 50% no-repeat;margin:0 5px;overflow:hidden}.expanded .comment-image .comment-image-progress:before{position:absolute;content:"";display:block;top:55px;bottom:20px;left:0;right:0;height:5px;width:100%;background-color:#dbdfe4}.expanded .comment-image .comment-image-progress .comment-image-loaded{position:absolute;background-color:#7f919e;top:55px;left:0;right:0;bottom:20px;height:5px;width:0}.expanded .comment-image .comment-image-list{list-style:none;display:-webkit-box;display:-ms-flexbox;display:flex}.expanded .comment-image .comment-image-item{height:80px;margin-left:5px;position:relative;border-radius:3px;overflow:hidden}.expanded .comment-image .comment-image-item:before{overflow:hidden;line-height:0;height:0;transition:all .3s;content:"\70B9\51FB\79FB\9664";display:block;text-align:center;position:absolute;bottom:0;left:0;right:0;width:100%;font-size:12px;background-color:rgba(0,0,0,.5);line-height:25px;color:#fff}.expanded .comment-image .comment-image-item:hover:before{height:25px}.expanded .comment-image .comment-image-item .comment-image-object{height:100%;border-radius:3px;overflow:hidden}.expanded .comment-image .comment-image-item.loading .comment-image-object{width:20px;margin:0 30px}.expanded .comment-image .comment-image-item.loading:before{display:none}.comment-form-wrapper.editing+.comment-login{opacity:1;height:auto;margin-top:10px}.comment-form-wrapper.editing .comment-form-textarea{font:14px/16px Helvetica Neue,Helvetica,Arial,\\5FAE\8F6F\96C5\9ED1,Microsoft YaHei;height:74px}.comment-form-wrapper.editing .comment-image{transition:padding-bottom .15s ease-in-out;background-color:rgba(16,48,68,.03)}.comment-form-wrapper.editing .comment-actions{transition:all .2s ease-in-out;border-top:2px solid #dbdfe4;opacity:1;height:36px;filter:alpha(opacity=100);visibility:visible!important}.comment-form-wrapper.editing .comment-actions-form{transition:all .3s .5s;margin:87px -2px -2px}.comment-form-wrapper.editing .comment-form-submit{opacity:1}.comment-form-wrapper.focus{border:2px solid #c2c6cc}.comment-form-wrapper.focus .comment-actions{border-top:2px solid #c2c6cc}.comment-form-wrapper.focus .comment-actions .comment-actions-label .icon{fill:#656c7a}.comment-form-wrapper.focus.expanded .comment-image{border-top:2px solid #c2c6cc}.comment-form-wrapper.expanded .comment-image{border-top:2px solid #dbdfe4;padding:10px 0 8px}.comment-form-wrapper.logged-in .comment-form-submit{border-radius:0 0 4px;transition:none;opacity:1}.comment-form-wrapper.logged-in .comment-actions-form{margin:0;transition:all .5s}.comment-form-wrapper.logged-in+.comment-login{height:0;opacity:0;margin-top:-40px}.comment-form-wrapper.logged-in .exit{display:block}.comment-form-wrapper .comment-form-textarea{width:100%;display:block;border:none;overflow:auto;color:#2a2e2e;cursor:text;resize:none;height:44px;font:18px/30px Helvetica Neue,Helvetica,Arial,\\5FAE\8F6F\96C5\9ED1,Microsoft YaHei;padding:7px;transition:all .2s ease-in-out}.comment-form-wrapper .comment-form-textarea::-webkit-input-placeholder{color:#7f919e}.comment-form-wrapper .comment-form-textarea::-moz-placeholder{color:#7f919e}.comment-form-wrapper .comment-form-alert:not(:empty){background-color:#f05f70;padding:10px;line-height:20px;font-size:13px;font-weight:700;color:#fff;margin:0 -2px;border-top:2px solid #dbdfe4}.comment-actions-form{display:-webkit-box;display:-ms-flexbox;display:flex}.comment-actions-form .comment-form-cancel{line-height:36px;padding:0 15px;font-size:12px}.comment-actions-form .comment-form-submit{z-index:1;border:none;opacity:0;margin:-2px;white-space:nowrap;border-radius:4px;height:38px;width:80px;display:inline-block;background-color:rgba(29,47,58,.6);cursor:pointer;line-height:38px}.comment-actions-form .comment-form-submit .icon{margin:9px;fill:#fff;cursor:pointer;width:20px;height:20px}.comment-actions-form .comment-form-submit:hover{background-color:rgba(29,47,58,.75)}.comment-login{display:-webkit-box;display:-ms-flexbox;display:flex;opacity:0;transition:all .5s .2s;height:0;margin:-40px -5px 40px;overflow:hidden;-ms-flex-wrap:wrap;flex-wrap:wrap}.comment-thread-form{text-align:center;color:#656c7a;line-height:32px}.comment-thread-form .comment-form-submit{background-color:rgba(29,47,58,.6);border:none;white-space:nowrap;border-radius:4px;height:38px;width:120px;display:inline-block;cursor:pointer;line-height:38px;margin:10px 0;color:#fff;font-size:15px}.comment-thread-form .comment-form-submit:hover{background-color:rgba(29,47,58,.75)}.comment-form-item{display:-webkit-box;display:-ms-flexbox;display:flex;margin:10px 0}.comment-form-item .comment-form-label{display:block;height:32px;line-height:32px;font-size:14px;color:#656c7a;width:100px;text-align:right;font-weight:700}.comment-form-item .comment-form-textarea{background-color:#fff;border:2px solid #dbdfe4;transition:all .2s linear;padding:2px 10px;border-radius:4px;font-size:14px;height:64px;margin:0 5px;width:30px;line-height:20px;-webkit-box-flex:1;-ms-flex:auto;flex:auto}.comment-form-item .comment-form-textarea:focus{border:2px solid #c2c6cc}.comment-form-input{background-color:#fff;border:2px solid #dbdfe4;transition:all .2s linear;padding:0 10px;border-radius:4px;font-size:14px;height:32px;margin:0 5px;width:30px;line-height:32px;-webkit-box-flex:1;-ms-flex:auto;flex:auto}.comment-form-input::-webkit-input-placeholder{color:#7f919e}.comment-form-input::-moz-placeholder{color:#7f919e}.comment-form-input:focus{border:2px solid #c2c6cc}.comment-form-input[disabled]{color:#656c7a}.comment-list{font-size:14px}.comment-list:empty:after{content:"\6765\505A\7B2C\4E00\4E2A\7559\8A00\7684\4EBA\5427\FF01";display:block;opacity:.6;line-height:80px;text-align:center}.comment-list p{margin:0}.comment-list a{text-decoration:none;color:#0095dd}.comment-list a[href="javascript:void(0);"]{color:#000;cursor:default}.comment-list pre{overflow:hidden;margin:0 0 15px;border-left:4px solid #7f919e;padding:0 0 0 12px}.comment-list code,.comment-list pre{font-size:12px;font-family:monaco,menlo,monospace;line-height:20px}.comment-list code{padding:0 .3em;display:inline-block;vertical-align:top;margin:2px}.comment-list #comment-preview{opacity:.6}.comment-list .comment-item{padding-top:6px}.comment-list .comment-item-body{display:-webkit-box;display:-ms-flexbox;display:flex}.comment-list .comment-item-footer,.comment-list .comment-item-header{font-size:13px;line-height:1.2;color:#c2c6cc}.comment-list .comment-item-footer .comment-item-bullet,.comment-list .comment-item-header .comment-item-bullet{padding:0 2px}.comment-list .comment-item-header .comment-item-pname{color:#656c7a}.comment-list .comment-item-header .comment-item-pname .icon{width:12px;height:12px;margin:1px 2px;vertical-align:top;fill:#656c7a}.comment-list .comment-item-header .comment-item-pname:hover{color:#2a2e2e}.comment-list .comment-item-header .comment-item-pname:hover .icon{fill:#656c7a}.comment-list .comment-item-header .comment-item-badge{color:#fff;background:#7f919e;padding:1px 3px;margin:0 2px;font-size:10px;line-height:1.1;font-weight:700;border-radius:3px;display:inline-block}.comment-list .comment-item-header .comment-item-time{font-size:12px;color:#7f919e;word-spacing:-2px;font-weight:400}.comment-list .comment-item-header .comment-item-name{color:#0095dd;font-weight:700}.comment-list .comment-item-header .comment-item-name[href^=javascript]{cursor:text;color:#000}.comment-list .comment-item-footer{padding:5px 0}.comment-list .comment-item-footer .comment-item-delete,.comment-list .comment-item-footer .comment-item-edit,.comment-list .comment-item-footer .comment-item-reply{color:#656c7a;font-weight:500}.comment-list .comment-item-footer .comment-item-delete:hover,.comment-list .comment-item-footer .comment-item-edit:hover,.comment-list .comment-item-footer .comment-item-reply:hover{color:#2a2e2e}.comment-list .comment-item-footer .comment-item-cancel{color:#0095dd;font-weight:700}.comment-list .comment-item-images{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0 -5px;-ms-flex-wrap:wrap;flex-wrap:wrap}.comment-list .comment-item-images .comment-item-imagelink{height:100px;margin:0 5px}.comment-list .comment-item-images .comment-item-image{height:100%}.comment-list .comment-item.transparent{opacity:.4}.comment-list .comment-item-content{padding-top:5px;line-height:24px;font-size:14px}.comment-list .comment-item-content .at{padding-right:4px}.comment-list .comment-item-content .comment-item-content{min-height:20px}.comment-list .comment-item-content img.emojione{vertical-align:top;width:24px;height:24px;margin:0 3px}.comment-list .comment-item-body+.comment-box .comment-avatar,.comment-list .comment-item-body+.comment-box .comment-avatar-image,.comment-list .comment-item-children .comment-box .comment-avatar,.comment-list .comment-item-children .comment-box .comment-avatar-image,.comment-list .comment-item-children .comment-item-avatar,.comment-list .comment-item-children .comment-item-avatar img{width:36px;height:36px;margin-right:6px}.comment-list .comment-form-textarea{height:32px;padding:5px;line-height:22px;font-size:15px}.comment-list .comment-item-main{-webkit-box-flex:1;-ms-flex:1;flex:1}.comment-list .comment-box{margin:0}.comment-list .comment-item-body+.comment-box{padding-left:60px;margin-top:6px}.comment-list .comment-item-children{padding-left:60px}.comment-list .comment-item-children .comment-item-body+.comment-box,.comment-list .comment-item-children .comment-item-children{padding-left:42px}.comment-list .comment-item-children .comment-item-body+.comment-box .comment-item-children .comment-box,.comment-list .comment-item-children .comment-item-body+.comment-box .comment-item-children .comment-item-children,.comment-list .comment-item-children .comment-item-children .comment-item-children .comment-box,.comment-list .comment-item-children .comment-item-children .comment-item-children .comment-item-children{padding-left:0}.comment-loadmore{font-weight:500;display:block;text-align:center;padding:11px 14px;background-color:rgba(29,47,58,.6);color:#fff!important;line-height:1.1;border-radius:3px;transition:background .2s;text-shadow:none}.comment-loadmore:hover{background-color:rgba(29,47,58,.7)}.comment-loadmore.loading{background-color:#edeff2;color:#444!important;cursor:wait}.comment-form-error{position:absolute;background-color:#fff;font-size:14px;padding:10px;line-height:20px;border-radius:3px;box-shadow:0 0 5px 1px rgba(0,0,0,.3);margin-top:40px;margin-left:2px;z-index:10}.comment-form-error:before{width:10px;height:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg);box-shadow:0 0 5px 1px rgba(0,0,0,.3);top:-4px;left:15px}.comment-form-error:after,.comment-form-error:before{content:"";display:block;position:absolute;background-color:#fff}.comment-form-error:after{width:20px;height:12px;top:0;left:10px}.comment-item-children,.comment-list{text-align:left;list-style:none;margin-left:0;line-height:20px}.comment-avatar,.comment-item-avatar{display:block;width:48px;height:48px;margin-right:12px}.comment-avatar img,.comment-item-avatar img{border-radius:3px;width:48px;height:48px}@-webkit-keyframes disqus-loader-spinner-animation{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes disqus-loader-spinner-animation{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@media screen and (max-width:450px){.comment-item .comment-item-children .comment-box,.comment-item .comment-item-children .comment-item-children{padding-left:0!important}.comment-item .at,.comment-item .comment-avatar,.comment-item .comment-item-children .comment-item-avatar{display:none}.comment-form-input{margin:5px;width:100%}.comment-form-wrapper.editing .comment-actions-form{margin:180px 0 0}.comment-form-wrapper.logged-in .comment-actions-form{margin:0}} \ No newline at end of file diff --git a/dist/iDisqus.min.js b/dist/iDisqus.min.js index 45138cc..3b8e7da 100644 --- a/dist/iDisqus.min.js +++ b/dist/iDisqus.min.js @@ -1,8 +1,8 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.iDisqus=t():e.iDisqus=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var a=o[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var o={};return t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,o){o(1),o(2),e.exports=o(3)},function(e,t){},function(e,t,o){e.exports=o.p+"eac.json"},function(e,t,o){(function(e){var n;/*! - * v 0.1.12 +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.iDisqus=t():e.iDisqus=t()}(this,function(){return function(e){function t(a){if(o[a])return o[a].exports;var n=o[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var o={};return t.m=e,t.c=o,t.d=function(e,o,a){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,o){o(1),o(2),e.exports=o(3)},function(e,t){},function(e,t,o){e.exports=o.p+"eac.json"},function(e,t,o){(function(e){var a;/*! + * v 0.1.13 * https://github.com/fooleap/disqus-php-api * * Copyright 2017 fooleap * Released under the MIT license */ -!function(a){"use strict";function i(e){var t=d.createElement("a");return t.href=e,t}function r(e,t,o){var n=new XMLHttpRequest;return n.open("GET",encodeURI(e)),n.onreadystatechange=function(){4==n.readyState&&200==n.status&&t(n.responseText)},n.onerror=o,n.send(),n}function s(e,t,o,n){var a="string"==typeof t?t:Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&"),i=new XMLHttpRequest;return i.open("POST",e),i.onreadystatechange=function(){4==i.readyState&&200==i.status&&o(i.responseText)},i.onerror=n,i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.send(a),i}function l(e,t,o){[].forEach.call(e,function(e){e.addEventListener(t,o,!1)})}function m(e,t,o){[].forEach.call(e,function(e){e.removeEventListener(t,o,!1)})}function c(e){var t={prefix:"",suffix:"前",seconds:"几秒",minute:"1分钟",minutes:"%d分钟",hour:"1小时",hours:"%d小时",day:"1天",days:"%d天",month:"1个月",months:"%d个月",year:"1年",years:"%d年"},o=function(e,o){return t[e]&&t[e].replace(/%d/i,Math.abs(Math.round(o)))},n=document.getElementsByClassName("timeago");for(var a in n){var i=n[a];"object"==typeof i&&(i.innerHTML=function(e){if(e){e=e.replace(/\.\d+/,""),e=e.replace(/-/,"/").replace(/-/,"/"),e=e.replace(/T/," ").replace(/Z/," UTC"),e=e.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),e=new Date(1e3*e||e);var n=new Date,a=.001*(n.getTime()-e)>>0,i=a/60,r=i/60,s=r/24,l=s/365;return t.prefix+(a<45&&o("seconds",a)||a<90&&o("minute",1)||i<45&&o("minutes",i)||i<90&&o("hour",1)||r<24&&o("hours",r)||r<42&&o("day",1)||s<30&&o("days",s)||s<45&&o("month",1)||s<365&&o("months",s/30)||l<1.5&&o("year",1)||o("years",l))+t.suffix}}(i.getAttribute("title")||i.getAttribute("datetime")))}setTimeout(c,6e4)}var d=document,u=localStorage;!function(e){"function"!=typeof e.matches&&(e.matches=e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=this,o=(t.document||t.ownerDocument).querySelectorAll(e),n=0;o[n]&&o[n]!==t;)++n;return Boolean(o[n])}),"function"!=typeof e.closest&&(e.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window.Element.prototype);var p=function(){this.dom=arguments[0],this.init()};p.prototype={init:function(){var e=this;e.name=u.getItem("name"),e.email=u.getItem("email"),e.url=u.getItem("url"),e.avatar=u.getItem("avatar"),e.logged_in=u.getItem("logged_in");var t=e.dom.getElementsByClassName("comment-box");"true"==e.logged_in?[].forEach.call(t,function(t){t.querySelector(".comment-form-wrapper").classList.add("logged-in"),t.querySelector(".comment-form-name").value=e.name,t.querySelector(".comment-form-email").value=e.email,t.querySelector(".comment-form-url").value=e.url,t.querySelector(".comment-avatar-image").src=e.avatar}):([].forEach.call(t,function(t){t.querySelector(".comment-form-wrapper").classList.remove("logged-in"),t.querySelector(".comment-form-name").value=e.name,t.querySelector(".comment-form-email").value=e.email,t.querySelector(".comment-form-url").value=e.url,t.querySelector(".comment-avatar-image").src=e.avatar?e.avatar:t.querySelector(".comment-avatar-image").src}),u.setItem("logged_in","false"))},reset:function(){u.setItem("logged_in","false"),this.init()},submit:function(e){"false"==this.logged_in&&(u.setItem("name",e.name),u.setItem("email",e.email),u.setItem("url",e.url),u.setItem("avatar",e.avatar),u.setItem("logged_in","true"),this.init())}};var f=function(){var e=this;if(e.opts="object"==typeof arguments[1]?arguments[1]:arguments[0],e.dom=d.getElementById("string"==typeof arguments[0]?arguments[0]:"comment"),e.opts.api="/"==e.opts.api.slice(-1)?e.opts.api.slice(0,-1):e.opts.api,e.opts.site=e.opts.site?e.opts.site:location.origin,e.opts.url){var t=e.opts.url.replace(e.opts.site,"");e.opts.url="/"!=t.slice(0,1)?"/"+t:t}else e.opts.url=location.pathname+location.search;if(e.opts.identifier=e.opts.identifier?e.opts.identifier:e.opts.url,e.opts.link=e.opts.site+e.opts.url,e.opts.title=e.opts.title?e.opts.title:d.title,e.opts.slug=e.opts.slug?e.opts.slug.replace(/\//g,""):"",e.opts.desc=e.opts.desc?e.opts.desc:d.querySelector('[name="description"]')?d.querySelector('[name="description"]').content:"",e.opts.mode=e.opts.mode?e.opts.mode:1,e.opts.timeout=e.opts.timeout?e.opts.timeout:3e3,e.opts.toggle=e.opts.toggle?d.getElementById(e.opts.toggle):null,e.opts.badge=e.opts.badge?e.opts.badge:"管理员",e.opts.emoji_path=e.opts.emoji_path?e.opts.emoji_path:"https://assets-cdn.github.com/images/icons/emoji/unicode/",e.emoji_list=e.opts.emoji_list?e.opts.emoji_list:[{code:"smile",title:"笑脸",unicode:"1f604"},{code:"mask",title:"生病",unicode:"1f637"},{code:"joy",title:"破涕为笑",unicode:"1f602"},{code:"stuck_out_tongue_closed_eyes",title:"吐舌",unicode:"1f61d"},{code:"flushed",title:"脸红",unicode:"1f633"},{code:"scream",title:"恐惧",unicode:"1f631"},{code:"pensive",title:"失望",unicode:"1f614"},{code:"unamused",title:"无语",unicode:"1f612"},{code:"grin",title:"露齿笑",unicode:"1f601"},{code:"heart_eyes",title:"色",unicode:"1f60d"},{code:"sweat",title:"汗",unicode:"1f613"},{code:"smirk",title:"得意",unicode:"1f60f"},{code:"relieved",title:"满意",unicode:"1f60c"},{code:"rolling_eyes",title:"翻白眼",unicode:"1f644"},{code:"ok_hand",title:"OK",unicode:"1f44c"},{code:"v",title:"胜利",unicode:"270c"}],e.opts.emoji_preview){var o=d.scripts,n=o[o.length-1].src;n=n.substring(0,n.lastIndexOf("/")),r(n+"/eac.json",function(t){e.eac=JSON.parse(t)},function(){})}e.stat={current:"idisqus",loaded:!1,loading:!1,editing:!1,offsetTop:0,thread:null,next:null,message:null,mediaHtml:null,unload:[],root:[],count:0,imageSize:[],disqusLoaded:!1},window.disqus_config=function(){this.page.identifier=e.opts.identifier,this.page.title=e.opts.title,this.page.url=e.opts.link,this.callbacks.onReady.push(function(){e.stat.current="disqus",e.stat.disqusLoaded=!0,e.dom.querySelector("#idisqus").style.display="none",e.dom.querySelector("#disqus_thread").style.display="block",3==e.opts.mode&&e.opts.toggle&&(e.opts.toggle.disabled="",e.opts.toggle.checked=!0,e.opts.toggle.addEventListener("change",e.handle.toggle,!1))})},e.opts.init&&e.init()};f.prototype.init=function(){var e=this;if(e.dom){var t="";switch(e.emoji_list.forEach(function(o){t+='
  • '}),e.dom.innerHTML='
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n \n \n \n \n
      \n
      \n \n \n
      \n
      \n
      \n \n
      \n
      \n
        \n 加载更多\n
        \n
        ',e.guest=new p(e.dom),e.box=e.dom.querySelector(".comment-box").outerHTML.replace(/