From d8f3ec1c18eb6467fbd1118e74554604e4bc6eb3 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 19 May 2019 20:05:01 +0800 Subject: [PATCH] version 1.2.4 --- README.md | 4 ++-- dist/disqus.js | 4 ++-- dist/disqusjs.css | 4 ++-- package.json | 2 +- src/disqus.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4290284..a6a19d5 100644 --- a/README.md +++ b/README.md @@ -45,11 +45,11 @@ ```html - + - + ``` diff --git a/dist/disqus.js b/dist/disqus.js index 878e61f..631238a 100644 --- a/dist/disqus.js +++ b/dist/disqus.js @@ -1,6 +1,6 @@ /*! - * DisqusJS | v1.2.3 + * DisqusJS | v1.2.4 * Author: SukkaW * Link: https://github.com/SukkaW/DisqusJS * License: MIT - */"use strict";function _typeof(s){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&"function"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(s)}!function(s,e){"function"==typeof define&&define.amd?define("DisqusJS",[],e):"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e():s.DisqusJS=e()}("undefined"!=typeof self?self:void 0,function(){return function(s){var n=document,f=function(s){return n.getElementById(s)},o=function(s,e,t){var n=new XMLHttpRequest;n.open("GET",encodeURI(s),!0),n.onload=function(){if(200<=n.status&&n.status<300||304===n.status){var s=JSON.parse(n.responseText);e(s)}else a()},n.timeout=4500,n.ontimeout=function(s){t(s)},n.onerror=function(s){t(s)},n.send()},p=function(s,e){try{localStorage.setItem(s,e)}catch(s){}},d=function(s){var e=function(s){return s<10?"0".concat(s):s};s=Date.parse(new Date(s));var t=(s=new Date(s+288e5)).getFullYear(),n=e(s.getMonth()+1),o=e(s.getDate()),a=e(s.getHours()),r=e(s.getMinutes());return"".concat(t,"-").concat(n,"-").concat(o," ").concat(a,":").concat(r)};function e(){var s=n.createElement("script");f("disqus_thread").innerHTML='
评论完整模式加载中...如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或使用 评论基础模式
',f("dsqjs-force-dsqjs").addEventListener("click",r),s.src="https://".concat(h.config.shortname,".disqus.com/embed.js"),s.setAttribute("data-timestamp",+new Date),(n.head||n.body).appendChild(s)}function g(){f("disqus_thread").innerHTML='
正在检查 Disqus 能否访问...
';for(var s=["disqus.com","".concat(h.config.shortname,".disqus.com")],n=0,o=0,a=function(){s.length===n&&n===o?j():s.length===n&&r()},e=function(s){var e=new Image,t=setTimeout(function(){e.onerror=e.onload=null,n++,a()},3e3);e.onerror=function(){clearTimeout(t),n++,a()},e.onload=function(){clearTimeout(t),n++,o++,a()},e.src="https://".concat(s,"/favicon.ico?").concat(+new Date)},t=0;t切换到完整 Disqus 模式 进行初始化?',f("dsqjs-force-disqus").addEventListener("click",j)):a()},function(s){a()})}();var t=function i(s){var d=f("dsqjs-load-more"),c=n.getElementsByClassName("dsqjs-order-radio"),l=function s(){var e=!0,t=!1,n=void 0;try{for(var o,a=c[Symbol.iterator]();!(e=(o=a.next()).done);e=!0)o.value.removeEventListener("change",u)}catch(s){t=!0,n=s}finally{try{e||null==a.return||a.return()}finally{if(t)throw n}}d.removeEventListener("click",s),i(h.page.next)},r=function(){s?(d.classList.remove("dsqjs-disabled"),d.innerHTML="加载更多评论失败,点击重试",d.addEventListener("click",l)):a()},u=function s(e){h.sortType=e.target.getAttribute("value"),p("disqus.sort",h.sortType);var t=!0,n=!1,o=void 0;try{for(var a,r=c[Symbol.iterator]();!(t=(a=r.next()).done);t=!0)a.value.removeEventListener("change",s)}catch(s){n=!0,o=s}finally{try{t||null==r.return||r.return()}finally{if(n)throw o}}d.removeEventListener("click",l),h.page.comment=[],h.page.next="",f("dsqjs-post-container").innerHTML='

正在切换排序方式...

',d.classList.add("dsqjs-hide"),i()};s=s?"&cursor=".concat(s):"",d.classList.add("dsqjs-disabled");var m={parseDate:function(s){return Date.parse(new Date(s.createdAt))},parentAsc:function(s,e){return s.parent&&e.parent?m.parseDate(s)-m.parseDate(e):0}},e="".concat(h.config.api,"3.0/threads/listPostsThreaded?forum=").concat(h.config.shortname,"&thread=").concat(h.page.id).concat(s,"&api_key=").concat(v(),"&order=").concat(h.sortType);o(e,function(s){if(0===s.code&&0尝试完整 Disqus 模式 | 强制完整 Disqus 模式。',f("dsqjs-header").classList.remove("dsqjs-hide"),f("dsqjs-post-container").innerHTML='
这里冷冷清清的,一条评论都没有
',f("dsqjs-reload-disqus").addEventListener("click",g),f("dsqjs-force-disqus").addEventListener("click",j)):r()},function(s){r()})},q=function(s){var e,o,a,t,r=function(s){return s.comment.author.profileUrl?(s.comment.avatarEl=''),s.comment.authorEl='")):(s.comment.avatarEl=''),s.comment.authorEl='")),h.config.adminLabel&&s.isPrimary&&(s.comment.authorEl+=''.concat(h.config.adminLabel,"")),s},i=function(s){var t,e,n,o="",a="";return a=s.isDeleted?"此评论已被删除":(o="".concat(s.authorEl,''),s.message),'
'.concat(s.avatarEl,'
').concat(o,'
').concat((t=a,e=new RegExp(/(.+?)<\/a>/gi),n=new RegExp(/href=\"(.+?)\"/gi),(t.match(e)||[]).map(function(s){var e=s.match(n)[0].replace(/href=\"https:\/\/disq.us\/url\?url=/g,"").replace(/(.*)"/,"$1");e=(e=decodeURIComponent(e)).replace(/(.*):(.*)cuid=(.*)/,"$1"),t=t.replace(s,'').concat(e,""))}),t=t.replace(/href=/g,'target="_blank" href=')),"
")},n="";e=[],o=[],a=function(s){return{comment:s,author:s.author.name,isPrimary:!!h.config.admin&&s.author.username===h.config.admin,children:t(+s.id)}},t=function(s){if(0===o.length)return null;for(var e=[],t=0;t').concat(i(s.comment)).concat(function e(s){var t=s.nesting,n=s.children||[];if(n){var o=t<4?'
    ':'
      ';return n.map(function(s){(s=r(s)).nesting=t+1,o+='
    • ').concat(i(s.comment)).concat(e(s),"
    • ")}),0!==(o+="
    ").length?o:void 0}}(s),"")}),f("dsqjs-header").classList.remove("dsqjs-hide"),f("dsqjs-msg").innerHTML='你可能无法访问 Disqus,已启用评论基础模式。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 尝试完整 Disqus 模式 | 强制完整 Disqus 模式。',f("dsqjs-post-container").innerHTML=n,f("dsqjs-reload-disqus").addEventListener("click",g),f("dsqjs-force-disqus").addEventListener("click",j)}}function a(){f("dsqjs-msg").innerHTML='评论基础模式加载失败,是否 重载尝试完整 Disqus 模式 ?',f("dsqjs-reload-dsqjs").addEventListener("click",t),f("dsqjs-reload-disqus").addEventListener("click",g)}function r(){p("dsqjs_mode","dsqjs"),t()}function j(){p("dsqjs_mode","disqus"),e()}Array.isArray||(Array.isArray=function(s){return"[object Array]"===Object.prototype.toString.call(s)});var h={};h.config=s,h.config.api=h.config.api||"https://disqus.skk.moe/disqus/",h.config.identifier=h.config.identifier||n.location.origin+n.location.pathname+n.location.search,h.config.url=h.config.url||n.location.origin+n.location.pathname+n.location.search,h.config.title=h.config.title||n.title,h.page=[];var v=function(){return Array.isArray(h.config.apikey)?h.config.apikey[Math.floor(Math.random()*h.config.apikey.length)]:h.config.apikey};window.disqus_config=function(){this.page.url=h.config.url,this.page.identifier=h.config.identifier,this.page.title=h.config.title},h.mode=localStorage.getItem("dsqjs_mode"),h.sortType=localStorage.getItem("disqus.sort"),h.sortType||(p("disqus.sort","desc"),h.sortType="desc"),"disqus"===h.mode?e():"dsqjs"===h.mode?t():g()}}); \ No newline at end of file + */"use strict";function _typeof(s){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&"function"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(s)}!function(s,e){"function"==typeof define&&define.amd?define("DisqusJS",[],e):"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e():s.DisqusJS=e()}("undefined"!=typeof self?self:void 0,function(){return function(s){var l=document,j=function(s){return l.getElementById(s)},n=function(s,e,t){var n=new XMLHttpRequest;n.open("GET",encodeURI(s),!0),n.onload=function(){if(200<=n.status&&n.status<300||304===n.status){var s=JSON.parse(n.responseText);e(s)}else o()},n.timeout=4500,n.ontimeout=function(s){t(s)},n.onerror=function(s){t(s)},n.send()},y=function(s,e){try{localStorage.setItem(s,e)}catch(s){}},d=function(s){var e=function(s){return s<10?"0".concat(s):s};s=Date.parse(new Date(s));var t=(s=new Date(s+288e5)).getFullYear(),n=e(s.getMonth()+1),o=e(s.getDate()),a=e(s.getHours()),r=e(s.getMinutes());return"".concat(t,"-").concat(n,"-").concat(o," ").concat(a,":").concat(r)};function e(){var s=l.createElement("script");j("disqus_thread").innerHTML='
    评论完整模式加载中...如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或使用 评论基础模式
    ',j("dsqjs-force-dsqjs").addEventListener("click",r),s.src="https://".concat(k.config.shortname,".disqus.com/embed.js"),s.setAttribute("data-timestamp",+new Date),(l.head||l.body).appendChild(s)}function b(){j("disqus_thread").innerHTML='
    正在检查 Disqus 能否访问...
    ';for(var s=["disqus.com","".concat(k.config.shortname,".disqus.com")],n=0,o=0,a=function(){s.length===n&&n===o?L():s.length===n&&r()},e=function(s){var e=new Image,t=setTimeout(function(){e.onerror=e.onload=null,n++,a()},3e3);e.onerror=function(){clearTimeout(t),n++,a()},e.onload=function(){clearTimeout(t),n++,o++,a()},e.src="https://".concat(s,"/favicon.ico?").concat(+new Date)},t=0;t切换到完整 Disqus 模式 进行初始化?',j("dsqjs-force-disqus").addEventListener("click",L)):o()},function(s){o()})}();var t=function m(s){var f=j("dsqjs-load-more"),q=l.getElementsByClassName("dsqjs-order-radio");$loadHideCommentInDisqus=l.getElementsByClassName("dsqjs-has-more-btn");var p=function s(){var e=!0,t=!1,n=void 0;try{for(var o,a=q[Symbol.iterator]();!(e=(o=a.next()).done);e=!0)o.value.removeEventListener("change",g)}catch(s){t=!0,n=s}finally{try{e||null==a.return||a.return()}finally{if(t)throw n}}f.removeEventListener("click",s);var r=!0,i=!1,d=void 0;try{for(var c,l=$loadHideCommentInDisqus[Symbol.iterator]();!(r=(c=l.next()).done);r=!0)c.value.removeEventListener("click",b)}catch(s){i=!0,d=s}finally{try{r||null==l.return||l.return()}finally{if(i)throw d}}m(k.page.next)},u=function(){s?(f.classList.remove("dsqjs-disabled"),f.innerHTML="加载更多评论失败,点击重试",f.addEventListener("click",p)):o()},g=function s(e){k.sortType=e.target.getAttribute("value"),y("disqus.sort",k.sortType);var t=!0,n=!1,o=void 0;try{for(var a,r=q[Symbol.iterator]();!(t=(a=r.next()).done);t=!0)a.value.removeEventListener("change",s)}catch(s){n=!0,o=s}finally{try{t||null==r.return||r.return()}finally{if(n)throw o}}f.removeEventListener("click",p);var i=!0,d=!1,c=void 0;try{for(var l,u=$loadHideCommentInDisqus[Symbol.iterator]();!(i=(l=u.next()).done);i=!0)l.value.removeEventListener("click",b)}catch(s){d=!0,c=s}finally{try{i||null==u.return||u.return()}finally{if(d)throw c}}k.page.comment=[],k.page.next="",j("dsqjs-post-container").innerHTML='

    正在切换排序方式...

    ',f.classList.add("dsqjs-hide"),m()};s=s?"&cursor=".concat(s):"",f.classList.add("dsqjs-disabled");var v={parseDate:function(s){return Date.parse(new Date(s.createdAt))},parentAsc:function(s,e){return s.parent&&e.parent?v.parseDate(s)-v.parseDate(e):0}},e="".concat(k.config.api,"3.0/threads/listPostsThreaded?forum=").concat(k.config.shortname,"&thread=").concat(k.page.id).concat(s,"&api_key=").concat(a(),"&order=").concat(k.sortType);n(e,function(s){if(0===s.code&&0尝试完整 Disqus 模式 | 强制完整 Disqus 模式。',j("dsqjs-header").classList.remove("dsqjs-hide"),j("dsqjs-post-container").innerHTML='
    这里冷冷清清的,一条评论都没有
    ',j("dsqjs-reload-disqus").addEventListener("click",b),j("dsqjs-force-disqus").addEventListener("click",L)):u()},function(s){u()})},h=function(s){var e,o,a,t,r=function(s){return s.comment.author.profileUrl?(s.comment.avatarEl=''),s.comment.authorEl='")):(s.comment.avatarEl=''),s.comment.authorEl='")),k.config.adminLabel&&s.isPrimary&&(s.comment.authorEl+=''.concat(k.config.adminLabel,"")),s},i=function(s){var e="",t="";return t=s.isDeleted?"此评论已被删除":(e="".concat(s.authorEl,''),s.message),'
    '.concat(s.avatarEl,'
    ').concat(e,'
    ').concat(function(s){var e=l.createElement("div");e.innerHTML=s;var t=e.getElementsByTagName("a"),n=!0,o=!1,a=void 0;try{for(var r,i=t[Symbol.iterator]();!(n=(r=i.next()).done);n=!0){var d=r.value,c=d.href;c=decodeURIComponent(c.replace(/https:\/\/disq.us\/url\?url=/g,"").replace(/(.*)"/,"$1")).replace(/(.*):(.*)cuid=(.*)/,"$1"),d.href=c,d.innerHTML=c,d.rel="nofollow noopener noreferrer",d.target="_blank"}}catch(s){o=!0,a=s}finally{try{n||null==i.return||i.return()}finally{if(o)throw a}}return e.innerHTML}(t),"
    ")},n="";e=[],o=[],a=function(s){return{comment:s,author:s.author.name,isPrimary:!!k.config.admin&&s.author.username===k.config.admin,children:t(+s.id),hasMore:s.hasMore}},t=function(s){if(0===o.length)return null;for(var e=[],t=0;t切换到 完整 Disqus 模式 显示更多回复

    ')),n+='
  • ').concat(i(s.comment)).concat(function t(s){var n=s.nesting,e=s.children||[];if(e){var o=n':'
      ';return e.map(function(s){(s=r(s)).nesting=n+1;var e="";s.hasMore&&(e='

      切换到 完整 Disqus 模式 显示更多回复

      ')),o+='
    • ').concat(i(s.comment)).concat(t(s)).concat(e,"
    • ")}),0!==(o+="
    ").length?o:void 0}}(s)).concat(e,"
  • ")}),j("dsqjs-header").classList.remove("dsqjs-hide"),j("dsqjs-msg").innerHTML='你可能无法访问 Disqus,已启用评论基础模式。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 尝试完整 Disqus 模式 | 强制完整 Disqus 模式。',j("dsqjs-post-container").innerHTML=n,j("dsqjs-reload-disqus").addEventListener("click",b),j("dsqjs-force-disqus").addEventListener("click",L)}}function o(){j("dsqjs-msg").innerHTML='评论基础模式加载失败,是否 重载尝试完整 Disqus 模式 ?',j("dsqjs-reload-dsqjs").addEventListener("click",t),j("dsqjs-reload-disqus").addEventListener("click",b)}function r(){y("dsqjs_mode","dsqjs"),t()}function L(){y("dsqjs_mode","disqus"),e()}Array.isArray||(Array.isArray=function(s){return"[object Array]"===Object.prototype.toString.call(s)});var k={};k.config=s,k.config.api=k.config.api||"https://disqus.skk.moe/disqus/",k.config.identifier=k.config.identifier||l.location.origin+l.location.pathname+l.location.search,k.config.url=k.config.url||l.location.origin+l.location.pathname+l.location.search,k.config.title=k.config.title||l.title,k.config.nesting=k.config.nesting?parseInt(k.config.nesting):4,k.page=[];var a=function(){return Array.isArray(k.config.apikey)?k.config.apikey[Math.floor(Math.random()*k.config.apikey.length)]:k.config.apikey};window.disqus_config=function(){this.page.url=k.config.url,this.page.identifier=k.config.identifier,this.page.title=k.config.title},k.mode=localStorage.getItem("dsqjs_mode"),k.sortType=localStorage.getItem("disqus.sort"),k.sortType||(y("disqus.sort","desc"),k.sortType="desc"),"disqus"===k.mode?e():"dsqjs"===k.mode?t():b()}}); \ No newline at end of file diff --git a/dist/disqusjs.css b/dist/disqusjs.css index abc52c2..8cb814b 100644 --- a/dist/disqusjs.css +++ b/dist/disqusjs.css @@ -1,6 +1,6 @@ /*! - * DisqusJS - Default Theme | v1.2.3 + * DisqusJS - Default Theme | v1.2.4 * Author: SukkaW * Link: https://github.com/SukkaW/DisqusJS * License: MIT - */#dsqjs *{margin:0;padding:0;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#dsqjs a{text-decoration:none;color:#076dd0}#dsqjs .dsqjs-hide{display:none!important}#dsqjs .dsqjs-disabled{cursor:not-allowed;opacity:.5}#dsqjs #dsqjs-msg{text-align:center;margin-top:4px;margin-bottom:4px;font-size:14px}#dsqjs #dsqjs-msg .dsqjs-msg-btn{cursor:pointer}#dsqjs .dsqjs-bullet{line-height:1.4;margin:0 2px}#dsqjs .dsqjs-bullet::after{color:#c2c6cc;content:"·";font-weight:700}#dsqjs .dsqjs-clearfix:after,#dsqjs .dsqjs-clearfix:before{display:table;content:"";line-height:0;clear:both}#dsqjs .dsqjs-nav{position:relative;margin:0 0 20px;border-bottom:2px solid #e7e9ee}#dsqjs ol,#dsqjs ul{list-style:none;list-style-type:none}#dsqjs .dsqjs-no-comment{text-align:center;font-size:16px;line-height:1.5;word-wrap:break-word;overflow:hidden;color:#2a2e2e;margin-bottom:6px}#dsqjs .dsqjs-nav-tab{float:left;text-transform:capitalize;font-size:15px;padding:12px 0;color:#656c7a;display:block;margin:0 15px 0 0;font-weight:700;line-height:1;position:relative;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}#dsqjs .dsqjs-nav-tab:last-child{margin:0}#dsqjs .dsqjs-tab-active{color:#2a2e2e}#dsqjs .dsqjs-tab-active>span:after{content:" ";display:block;height:2px;background-color:#076dd0!important;position:absolute;bottom:-2px;left:0;right:0}#dsqjs .dsqjs-post-list .dsqjs-post-item{position:relative;margin-bottom:16px}#dsqjs .dsqjs-post-list .dsqjs-post-avatar{float:left;margin-right:10px;position:relative;background:#dbdfe4;padding:0;display:block;border-radius:4px}#dsqjs .dsqjs-post-list .dsqjs-post-avatar img{width:44px;height:44px;display:block;border-radius:4px}#dsqjs .dsqjs-post-list .dsqjs-post-header{line-height:1;font-size:14px;margin-bottom:3px}#dsqjs .dsqjs-post-list .dsqjs-post-header .dsqjs-post-author{color:#656c7a;font-weight:700}#dsqjs .dsqjs-post-list .dsqjs-post-header .dsqjs-admin-badge{color:#fff;background:#687a86;padding:1px 3px;margin-left:4px;font-size:12px;line-height:1;font-weight:700;border-radius:3px;display:inline-block;position:relative;top:-1px;left:1px}#dsqjs .dsqjs-post-list .dsqjs-post-header .dsqjs-meta{display:inline-block;font-size:12px;color:#656c7a}#dsqjs .dsqjs-post-body{font-size:15px;line-height:1.5;word-wrap:break-word;overflow:hidden;color:#2a2e2e}#dsqjs .dsqjs-post-body code,#dsqjs .dsqjs-post-body pre{font-family:"SF Mono","Segoe UI Mono",Consolas,"Roboto Mono","Liberation Mono",Menlo,Courier,'Courier New',monospace!important}#dsqjs .dsqjs-post-body code{padding:.2em .4em;margin:0;font-size:85%;background:#f5f5f5;color:inherit;border-radius:3px}#dsqjs .dsqjs-post-body pre{padding:.5em;overflow:auto;font-size:85%;line-height:1.45;border-radius:3px;background:#f5f5f5;margin:.5em 0}#dsqjs .dsqjs-post-body blockquote{padding:0 .8em;margin:.5em 0;color:#6a737d;border-left:.25em solid #dfe2e5}#dsqjs .dsqjs-post-body p:last-child{margin:0}#dsqjs .dsqjs-post-list.dsqjs-children>li{margin-left:30px}@media (min-width:768px){#dsqjs .dsqjs-post-list.dsqjs-children>li{margin-left:48px}#dsqjs .dsqjs-post-list .dsqjs-post-avatar{margin-right:12px}#dsqjs .dsqjs-post-list .dsqjs-post-item{margin-bottom:20px}}@media (min-width:1024px){#dsqjs .dsqjs-post-list.dsqjs-children>li{margin-left:60px}}#dsqjs .dsqjs-post-list.dsqjs-children .dsqjs-post-avatar img{width:38px;height:38px}#dsqjs .dsqjs-load-more{font-size:14px;font-weight:400;display:block;text-align:center;padding:11px 14px;margin:0 0 24px;background:#687a86;color:#fff;cursor:pointer}#dsqjs .dsqjs-load-more:hover{opacity:.8}#dsqjs footer{text-align:right;line-height:1.5;padding-top:12px;font-weight:700;font-size:16px;color:#555}#dsqjs .dsqjs-disqus-logo{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 438 80'%3e%3cpath fill='%23575B5D' d='M30.2 1.6H1v76h28.9C57 77.6 73 61.3 73 39.4v-.2c0-22-15.7-37.6-42.9-37.6zm21.3 38.1c0 12.3-8.4 19.3-21 19.3H22V20.3h8.5c12.6 0 21 7 21 19.2v.2zm35.6 38h21.2V1.5H87.1v76zm70-47.4c-10.4-2.4-13-4-13-7.4v-.2c0-2.7 2.4-5 7.6-5 6.7 0 14.3 2.7 21.2 7.6l10.6-14.9A47.9 47.9 0 0 0 152.2.3c-18.3 0-29.4 10.2-29.4 24.3v.2c0 15.7 12.4 20.3 28.6 24 10.4 2.3 12.9 4 12.9 7.2v.2c0 3.3-3 5.2-8.7 5.2-8.8 0-17.2-3.1-24.7-9l-11.7 14a53.1 53.1 0 0 0 35.6 12.5c18.5 0 30.7-9.2 30.7-24.7V54c0-14.3-10.8-20-28.3-23.7zm120.7 9.3v-.2A39.5 39.5 0 0 0 236.9.1c-23.4 0-41 17.7-41 39.5v.2a39.5 39.5 0 0 0 40.8 39.4c8.7 0 16.6-2.5 23.1-6.8l8.4 7.5L279 68.1l-7.9-6.6a38 38 0 0 0 6.8-21.9zm-21.4.5c0 2.6-.5 5-1.3 7.3l-10.4-9.3-10.6 12 10.5 9a21.7 21.7 0 0 1-7.7 1.4c-11.6 0-19.4-9.7-19.4-20.7v-.2c0-11 7.7-20.5 19.2-20.5 11.7 0 19.7 9.7 19.7 20.7v.3zm83.5 4.3c0 10.6-5.5 15.6-14 15.6s-14-5.2-14-16.1V1.6h-21.4v42.7C290.5 68 304 79 325.7 79s35.6-10.8 35.6-35.3V1.5h-21.4v42.8zm68.9-14.1c-10.6-2.4-13.2-4-13.2-7.4v-.2c0-2.7 2.5-5 7.6-5 6.8 0 14.4 2.7 21.3 7.6l10.6-14.9A47.9 47.9 0 0 0 403.8.3c-18.3 0-29.5 10.2-29.5 24.3v.2c0 15.7 12.5 20.3 28.7 24 10.3 2.3 12.8 4 12.8 7.2v.2c0 3.3-3 5.3-8.7 5.3-8.8 0-17.1-3.2-24.6-9.2l-11.7 14A53.1 53.1 0 0 0 406.4 79c18.5 0 30.7-9.2 30.7-24.7V54c0-14.3-10.8-20-28.3-23.7z'/%3e%3c/svg%3e");background-position:50% 50%;background-repeat:no-repeat;display:inline-block;height:12px;width:65.7px}#dsqjs .dsqjs-order{display:-webkit-box;display:-ms-flexbox;display:flex;float:right;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:10px;margin-bottom:12px}#dsqjs .dsqjs-order-radio{display:none}#dsqjs .dsqjs-order-radio:checked+.dsqjs-order-label{color:#fff;background-color:#888}#dsqjs .dsqjs-order-label{display:block;height:20px;line-height:20px;margin-right:10px;font-size:12px;border-radius:2px;padding:0 5px;background-color:#dcdcdc;cursor:pointer} \ No newline at end of file + */#dsqjs *{margin:0;padding:0;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#dsqjs a{text-decoration:none;color:#076dd0}#dsqjs .dsqjs-hide{display:none!important}#dsqjs .dsqjs-disabled{cursor:not-allowed;opacity:.5}#dsqjs #dsqjs-msg{text-align:center;margin-top:4px;margin-bottom:4px;font-size:14px}#dsqjs #dsqjs-msg .dsqjs-msg-btn{cursor:pointer}#dsqjs .dsqjs-bullet{line-height:1.4;margin:0 2px}#dsqjs .dsqjs-bullet::after{color:#c2c6cc;content:"·";font-weight:700}#dsqjs .dsqjs-clearfix:after,#dsqjs .dsqjs-clearfix:before{display:table;content:"";line-height:0;clear:both}#dsqjs .dsqjs-nav{position:relative;margin:0 0 20px;border-bottom:2px solid #e7e9ee}#dsqjs ol,#dsqjs ul{list-style:none;list-style-type:none}#dsqjs .dsqjs-no-comment{text-align:center;font-size:16px;line-height:1.5;word-wrap:break-word;overflow:hidden;color:#2a2e2e;margin-bottom:6px}#dsqjs .dsqjs-nav-tab{float:left;text-transform:capitalize;font-size:15px;padding:12px 0;color:#656c7a;display:block;margin:0 15px 0 0;font-weight:700;line-height:1;position:relative;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}#dsqjs .dsqjs-nav-tab:last-child{margin:0}#dsqjs .dsqjs-tab-active{color:#2a2e2e}#dsqjs .dsqjs-tab-active>span:after{content:" ";display:block;height:2px;background-color:#076dd0!important;position:absolute;bottom:-2px;left:0;right:0}#dsqjs .dsqjs-post-list .dsqjs-post-item{position:relative;margin-bottom:16px}#dsqjs .dsqjs-post-list .dsqjs-post-avatar{float:left;margin-right:10px;position:relative;background:#dbdfe4;padding:0;display:block;border-radius:4px}#dsqjs .dsqjs-post-list .dsqjs-post-avatar img{width:44px;height:44px;display:block;border-radius:4px}#dsqjs .dsqjs-post-list .dsqjs-post-header{line-height:1;font-size:14px;margin-bottom:3px}#dsqjs .dsqjs-post-list .dsqjs-post-header .dsqjs-post-author{color:#656c7a;font-weight:700}#dsqjs .dsqjs-post-list .dsqjs-post-header .dsqjs-admin-badge{color:#fff;background:#687a86;padding:1px 3px;margin-left:4px;font-size:12px;line-height:1;font-weight:700;border-radius:3px;display:inline-block;position:relative;top:-1px;left:1px}#dsqjs .dsqjs-post-list .dsqjs-post-header .dsqjs-meta{display:inline-block;font-size:12px;color:#656c7a}#dsqjs .dsqjs-post-body{font-size:15px;line-height:1.5;word-wrap:break-word;overflow:hidden;color:#2a2e2e}#dsqjs .dsqjs-post-body code,#dsqjs .dsqjs-post-body pre{font-family:"SF Mono","Segoe UI Mono",Consolas,"Roboto Mono","Liberation Mono",Menlo,Courier,'Courier New',monospace!important}#dsqjs .dsqjs-post-body code{padding:.2em .4em;margin:0;font-size:85%;background:#f5f5f5;color:inherit;border-radius:3px}#dsqjs .dsqjs-post-body pre{padding:.5em;overflow:auto;font-size:85%;line-height:1.45;border-radius:3px;background:#f5f5f5;margin:.5em 0}#dsqjs .dsqjs-post-body blockquote{padding:0 .8em;margin:.5em 0;color:#6a737d;border-left:.25em solid #dfe2e5}#dsqjs .dsqjs-post-body p:last-child{margin:0}#dsqjs .dsqjs-post-list.dsqjs-children>li{margin-left:30px}@media (min-width:768px){#dsqjs .dsqjs-post-list.dsqjs-children>li{margin-left:48px}#dsqjs .dsqjs-post-list .dsqjs-post-avatar{margin-right:12px}#dsqjs .dsqjs-post-list .dsqjs-post-item{margin-bottom:20px}}@media (min-width:1024px){#dsqjs .dsqjs-post-list.dsqjs-children>li{margin-left:60px}}#dsqjs .dsqjs-post-list.dsqjs-children .dsqjs-post-avatar img{width:38px;height:38px}#dsqjs .dsqjs-load-more{font-size:14px;font-weight:400;display:block;text-align:center;padding:11px 14px;margin:0 0 24px;background:#687a86;color:#fff;cursor:pointer}#dsqjs .dsqjs-load-more:hover{opacity:.8}#dsqjs footer{text-align:right;line-height:1.5;padding-top:12px;font-weight:700;font-size:16px;color:#555}#dsqjs .dsqjs-disqus-logo{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 438 80'%3e%3cpath fill='%23575B5D' d='M30.2 1.6H1v76h28.9C57 77.6 73 61.3 73 39.4v-.2c0-22-15.7-37.6-42.9-37.6zm21.3 38.1c0 12.3-8.4 19.3-21 19.3H22V20.3h8.5c12.6 0 21 7 21 19.2v.2zm35.6 38h21.2V1.5H87.1v76zm70-47.4c-10.4-2.4-13-4-13-7.4v-.2c0-2.7 2.4-5 7.6-5 6.7 0 14.3 2.7 21.2 7.6l10.6-14.9A47.9 47.9 0 0 0 152.2.3c-18.3 0-29.4 10.2-29.4 24.3v.2c0 15.7 12.4 20.3 28.6 24 10.4 2.3 12.9 4 12.9 7.2v.2c0 3.3-3 5.2-8.7 5.2-8.8 0-17.2-3.1-24.7-9l-11.7 14a53.1 53.1 0 0 0 35.6 12.5c18.5 0 30.7-9.2 30.7-24.7V54c0-14.3-10.8-20-28.3-23.7zm120.7 9.3v-.2A39.5 39.5 0 0 0 236.9.1c-23.4 0-41 17.7-41 39.5v.2a39.5 39.5 0 0 0 40.8 39.4c8.7 0 16.6-2.5 23.1-6.8l8.4 7.5L279 68.1l-7.9-6.6a38 38 0 0 0 6.8-21.9zm-21.4.5c0 2.6-.5 5-1.3 7.3l-10.4-9.3-10.6 12 10.5 9a21.7 21.7 0 0 1-7.7 1.4c-11.6 0-19.4-9.7-19.4-20.7v-.2c0-11 7.7-20.5 19.2-20.5 11.7 0 19.7 9.7 19.7 20.7v.3zm83.5 4.3c0 10.6-5.5 15.6-14 15.6s-14-5.2-14-16.1V1.6h-21.4v42.7C290.5 68 304 79 325.7 79s35.6-10.8 35.6-35.3V1.5h-21.4v42.8zm68.9-14.1c-10.6-2.4-13.2-4-13.2-7.4v-.2c0-2.7 2.5-5 7.6-5 6.8 0 14.4 2.7 21.3 7.6l10.6-14.9A47.9 47.9 0 0 0 403.8.3c-18.3 0-29.5 10.2-29.5 24.3v.2c0 15.7 12.5 20.3 28.7 24 10.3 2.3 12.8 4 12.8 7.2v.2c0 3.3-3 5.3-8.7 5.3-8.8 0-17.1-3.2-24.6-9.2l-11.7 14A53.1 53.1 0 0 0 406.4 79c18.5 0 30.7-9.2 30.7-24.7V54c0-14.3-10.8-20-28.3-23.7z'/%3e%3c/svg%3e");background-position:50% 50%;background-repeat:no-repeat;display:inline-block;height:12px;width:65.7px}#dsqjs .dsqjs-order{display:-webkit-box;display:-ms-flexbox;display:flex;float:right;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:10px;margin-bottom:12px}#dsqjs .dsqjs-order-radio{display:none}#dsqjs .dsqjs-order-radio:checked+.dsqjs-order-label{color:#fff;background-color:#888}#dsqjs .dsqjs-order-label{display:block;height:20px;line-height:20px;margin-right:10px;font-size:12px;border-radius:2px;padding:0 5px;background-color:#dcdcdc;cursor:pointer}#dsqjs p.dsqjs-has-more{margin-bottom:24px;margin-left:48px;font-size:13px;line-height:15px}#dsqjs p.dsqjs-has-more a.dsqjs-has-more-btn{color:#656c7a;text-decoration:underline;cursor:pointer} \ No newline at end of file diff --git a/package.json b/package.json index 91bf074..815b835 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "disqusjs", - "version": "1.2.3", + "version": "1.2.4", "description": "Alternative DISQUS - Render comments components from Disqus API", "main": "dist/disqus.js", "scripts": { diff --git a/src/disqus.js b/src/disqus.js index 1dce5f1..75d5ce7 100644 --- a/src/disqus.js +++ b/src/disqus.js @@ -546,7 +546,7 @@ * @return {string} msg - 经过处理的评论信息 */ let removeDisqUs = (msg) => { - let el = document.createElement('div'); + let el = d.createElement('div'); el.innerHTML = msg; let aTag = el.getElementsByTagName('a'); for (let i of aTag) {