From 6dc26b5092b906337ac21d083ab5906c102cc8fe Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 10 Feb 2019 23:53:58 +0800 Subject: [PATCH] release 1.2.0 --- README.md | 28 ++++++++++++++++++---------- dist/disqus.js | 4 ++-- dist/disqusjs.css | 4 ++-- docs/index.html | 4 ++-- package.json | 2 +- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 840673d..43bac1d 100644 --- a/README.md +++ b/README.md @@ -136,9 +136,10 @@ var dsqjs = new DisqusJS({ - DisqusJS 请求的 API Endpoint,通常情况下你应该配置一个 Disqus API 的反代并填入反代的地址。你也可以直接使用 DISQUS 官方 API 的 Endpoint `https://disqus.com/api/`,或是使用我搭建的 Disqus API 反代 Endpoint `https://disqus.skk.moe/disqus/`。如有必要可以阅读关于搭建反代的 [相关内容](https://github.com/SukkaW/DisqusJS#%E8%B0%83%E8%AF%95%E8%BF%9B%E9%98%B6%E4%BD%BF%E7%94%A8--%E5%BC%80%E5%8F%91%E7%9B%B8%E5%85%B3) - **建议**,默认值为 `https://disqus.skk.moe/disqus/` -**apikey** `{string}` +**apikey** `{string || {Array}}` - DisqusJS 向 API 发起请求时使用的 API Key,你应该在配置 Disqus Application 时获取了 API Key +- DisqusJS 支持填入一个 包含多个 API Key 的 Array,在每次请求时会随机使用其中一个;如果你只需要填入一个 API Key,则可以填入 String 或 Array。 - **必填**,无默认值 以下配置和 Disqus Moderator Badge 相关,缺少一个都不会显示 Badge @@ -158,18 +159,25 @@ var dsqjs = new DisqusJS({ 未来可能扩展的配置: - nesting 最大评论嵌套数(超过嵌套层数的评论会显示在同一层级下,目前该值采用 Disqus 官方 4 级嵌套且不可改变) -- apikey (array) 一组 APIKey 用于“负载均衡”、应对 DISQUS API 的 Rate Limit。 - nocomment 没有评论时的提示语(对应 Disqus Admin - Settings - Community - Comment Count Link - Zero comments) -- commentPolicyURL 站点评论政策 URL(对应 对应 Disqus Admin - Settings - General - Comment Policy URL) -- commentPolicyText 站点评论政策 URL(对应 对应 Disqus Admin - Settings - General - Comment Policy Summary) -- newcomment 是否允许添加新评论(目前增加评论功能尚未实现) +~~- commentPolicyURL 站点评论政策 URL(对应 对应 Disqus Admin - Settings - General - Comment Policy URL)~~ +~~- commentPolicyText 站点评论政策简介(对应 对应 Disqus Admin - Settings - General - Comment Policy Summary)~~ +~~- newcomment 是否允许添加新评论(目前增加评论功能尚未实现)~~ + +### PJAX 站点注意事项 + +如果你在使用 DisqusJS v0.2.5 版本,需要在 PJAX 的页面跳转事件下销毁 Disqus 实例(Disqus 不支持 PJAX)、并通过 `window.disqusjs.load();` 重新加载 DisqusJS。DisqusJS v0.2.5 版本支持自动判断当前页面是否存在 `#disqus_thread` 容器,如果容器不存在就不加载。 + +DisqusJS v1.0.0 及之后的版本使用了新的方法加载 DisqusJS,并去除了对 `#disqus_thread` 容器的判断,在没有容器的页面初始化 DisqusJS 实例会报错。在切换页面时需要销毁已有的 Disqus 实例和 DisqusJS 实例,然后重新初始化一个新的 DisqusJS 实例。 + +代码可以参考 [DIYgod 的这条 commit](https://github.com/DIYgod/diygod.me/commit/31012c21a457df5ab172c2e24bc197d5a0de8e69#diff-566630479f69d2ba36b6b996f6ba5a8f),DIYgod 在这次 commit 中将 DisqusJS 从 v0.2.5 升级到了 v1.0.8。 ## 注意 - Disqus API 不支持通过 AJAX 方式调用创建评论或者初始化页面,所以自动初始化页面和创建匿名评论在不搭配专门的后端程序的话不能实现。 - 所以如果 DisqusJS 检测到当前页面没有初始化、会提示是否切换到 Disqus 完整模式进行初始化。 - DisqusJS 仅在当前域名首次访问时检测 Disqus 可用性并选择模式,并把结果持久化在 localStorage 中,之后访问都会沿用之前的模式。 -- 一个 Disqus Application 的 Rate Limit 是每小时 1000 次;DisqusJS 一次正常加载会产生 2 次请求。未来可能会开放填入多个 API Key,支持调用多个 Application,绕过 Rate Limit。 +- 一个 Disqus Application 的 Rate Limit 是每小时 1000 次;DisqusJS 一次正常加载会产生 2 次请求。~~未来可能会开放填入多个 API Key,支持调用多个 Application,绕过 Rate Limit。~~DisqusJS 已经支持填入多个 API Key,你可以创建多个 Disqus API Application 并分别获取 API Key。 - 我搭建了一个 Disqus API 反代的服务 `https://disqus.skk.moe/disqus/` 供没有能力搭建反代的用户使用,不保证 SLA、缓存 TTL 1 小时。 ## 谁在使用 DisqusJS? @@ -177,19 +185,19 @@ var dsqjs = new DisqusJS({ - Sukka: [Sukka's Blog](https://blog.skk.moe) - DIYgod: [Hi, DIYgod](https://diygod.me) ([source](https://github.com/DIYgod/diygod.me)) - imlonghao: [Imlonghao](https://imlonghao.com/) -- Yrom Wang: [Yrom's](https://yrom.net/) (Still using v0.2.5) +- Yrom Wang: [Yrom's](https://yrom.net/) (Still using DisqusJS v0.2.5) 如果你的站点或者个人博客在使用 DisqusJS,来 [把你的网站分享给其他人吧](https://github.com/SukkaW/DisqusJS/issues/12)! ## 调试、进阶使用 & 开发相关 -- 需要反代的 Endpoint 是 `https://disqus.com/api/`,使用 Nginx、Caddy 都可以很轻松的设置一个反代。如果没有自己的服务器,可以使用 [Now](https://zeit.co) 提供的 Serverless 平台搭建一个反代,[这里](https://github.com/SukkaW/disqusjs-proxy-example) 提供了一个样例。 -- `a.disquscdn.com` 和 `c.disquscdn.com` 解析到 Cloudflare 而不是 Fastly,可用性大大增强;`disqus.com` 和 `shortname.disqus.com` 仍然被墙;`disq.us` 解析到 Fastly 连通性较差,建议直接解析获得原链接。 +- 需要反代的 Endpoint 是 `https://disqus.com/api/`,使用 Nginx、Caddy 都可以很轻松的设置一个反代。如果没有自己的服务器,可以使用 [Now](https://zeit.co) 提供的 Serverless 平台搭建一个反代,[这里](https://github.com/SukkaW/disqusjs-proxy-example) 提供了一个样例。当然,你也可以使用我搭建的反代 `https://disqus.skk.moe/disqus/`。 +- `a.disquscdn.com` 和 `c.disquscdn.com` 解析到 Cloudflare 而不是 Fastly,可用性大大增强;`disqus.com` 和 `shortname.disqus.com` 仍然被墙;`disq.us` 解析到 Fastly 连通性较差,DisqusJS 通过解析获得了原链接。 - DisqusJS 检测访客的 Disqus 可用性是通过检测 `disqus.com/favicon.ico` 和 `${disqusjs.config.shortname}.disqus.com/favicon.ico` 是否能正常加载,如果有一个加载出错或超时(2s)就判定 Disqus 不可用。 - DisqusJS 在 localStorage 中持久化了 Disqus 连通性检查结果,key 为 `dsqjs_mode`,value 为 `disqus` 或者 `dsqjs`。需要调整 DisqusJS 的模式时可以直接操作 localStorage。 - Disqus 自己的 config 保存在全局变量 `window.disqus_config` 中,你可能好奇为什么没有引入。实际上由于 `disqus_config` 和 DisqusJS 中有很多重复的配置,所以 DisqusJS 直接将相关配置项赋给了 `disqus_config`,所以用户只需要配置 Disqus 即可。 - DisqusJS 并没有使用 Webpack 将 `disqusjs.css` 和 `disqus.js` 打包在一起,大家可以开发自己的 DisqusJS 主题。所有 DisqusJS 创建的 HTML 元素都在 `
` 之中、几乎所有的元素都有自己的类名并都以 `dsqjs-` 为前缀,防止污染。 -- 为 PJAX 站点添加 +- DisqusJS v1.2.0 版本实现了评论排序。Disqus 将评论排序方式持久化在 localStorage 中、key 为 `disqus.sort`,DisqusJS 沿用了这一位置。 ## Todo List diff --git a/dist/disqus.js b/dist/disqus.js index 08aaefa..21d187f 100644 --- a/dist/disqus.js +++ b/dist/disqus.js @@ -1,6 +1,6 @@ /*! - * DisqusJS | v1.1.1 + * DisqusJS | v1.2.0 * 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 e=document,d=function(s){return e.getElementById(s)},c=function(s,e,n){var t=new XMLHttpRequest;t.open("GET",encodeURI(s),!0),t.onload=function(){if(200<=t.status&&t.status<300||304===t.status){var s=JSON.parse(t.responseText);e(s)}else u()},t.timeout=4500,t.ontimeout=function(s){n(s)},t.onerror=function(s){n(s)},t.send()},n=function(s,e){try{localStorage.setItem(s,e)}catch(s){}},r=function(s){s=Date.parse(new Date(s));var e=(s=new Date(s+288e5)).getFullYear(),n=s.getMonth()+1;n=n<10?"0".concat(n):n;var t=s.getDate();t=t<10?"0".concat(t):t;var o=s.getHours();o=o<10?"0".concat(o):o;var a=s.getMinutes();return a=a<10?"0".concat(a):a,"".concat(e,"-").concat(n,"-").concat(t," ").concat(o,":").concat(a)};function t(){var s=e.createElement("script");d("disqus_thread").innerHTML='
评论完整模式加载中...如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或使用 评论基础模式
',d("dsqjs-force-dsqjs").addEventListener("click",i),s.src="https://".concat(q.config.shortname,".disqus.com/embed.js"),s.setAttribute("data-timestamp",+new Date),(e.head||e.body).appendChild(s)}function l(){d("disqus_thread").innerHTML='
正在检查 Disqus 能否访问...
';for(var s=["disqus.com","".concat(q.config.shortname,".disqus.com")],t=0,o=0,a=function(){s.length===t&&t===o?m():s.length===t&&i()},e=function(s){var e=new Image,n=setTimeout(function(){e.onerror=e.onload=null,t++,a()},3e3);e.onerror=function(){clearTimeout(n),t++,a()},e.onload=function(){clearTimeout(n),t++,o++,a()},e.src="https://".concat(s,"/favicon.ico?").concat(+new Date)},n=0;n切换到完整 Disqus 模式 进行初始化?',d("dsqjs-force-disqus").addEventListener("click",m)):u()},function(s){u()})}();var n=function e(s){var n=d("dsqjs-load-more"),t=function s(){n.removeEventListener("click",s),e(q.page.next)},o=function(){s?(n.classList.remove("dsqjs-disabled"),n.innerHTML="加载更多评论失败,点击重试",n.addEventListener("click",t)):u()};s=s?"&cursor=".concat(s):"",n.classList.add("dsqjs-disabled");var a="".concat(q.config.api,"3.0/posts/list.json?forum=").concat(q.config.shortname,"&thread=").concat(q.page.id).concat(s,"&include=approved&include=deleted&api_key=").concat(q.config.apikey);c(a,function(s){0===s.code&&0尝试完整 Disqus 模式 | 强制完整 Disqus 模式。',d("dsqjs-header").classList.remove("dsqjs-hide"),d("dsqjs-post-container").innerHTML='
这里冷冷清清的,一条评论都没有
',d("dsqjs-reload-disqus").addEventListener("click",l),d("dsqjs-force-disqus").addEventListener("click",m)):o()},function(s){o()})},i=function(s){var e,o,a,n,i=function(s){return s.comment.author.profileUrl?(s.comment.avatarEl=''),s.comment.authorEl='")):(s.comment.avatarEl=''),s.comment.authorEl='")),q.config.adminLabel&&s.isPrimary&&(s.comment.authorEl+=''.concat(q.config.adminLabel,"")),s},c=function(s){var n,e,t,o="",a="";return a=s.isDeleted?"此评论已被删除":(o="".concat(s.authorEl,''),s.message),'
'.concat(s.avatarEl,'
').concat(o,'
').concat((n=a,e=new RegExp(/(.+?)<\/a>/gi),t=new RegExp(/href=\"(.+?)\"/gi),(n.match(e)||[]).map(function(s){var e=s.match(t)[0].replace(/href=\"https:\/\/disq.us\/url\?url=/g,"").replace(/(.*)"/,"$1");e=(e=decodeURIComponent(e)).replace(/(.*):(.*)cuid=(.*)/,"$1"),n=n.replace(s,'').concat(e,""))}),n=n.replace(/href=/g,'target="_blank" href=')),"
")},t="";e=[],o=[],a=function(s){return{comment:s,author:s.author.name,isPrimary:!!q.config.admin&&s.author.username===q.config.admin,children:n(+s.id)}},n=function(s){if(0===o.length)return null;for(var e=[],n=0;n').concat(c(s.comment)).concat(function e(s){var n=s.nesting,t=s.children||[];if(t){var o=n<4?'
    ':'
      ';return t.map(function(s){(s=i(s)).nesting=n+1,o+='
    • ').concat(c(s.comment)).concat(e(s),"
    • ")}),0!==(o+="
    ").length?o:void 0}}(s),"")}),d("dsqjs-header").classList.remove("dsqjs-hide"),d("dsqjs-msg").innerHTML='你可能无法访问 Disqus,已启用评论基础模式。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 尝试完整 Disqus 模式 | 强制完整 Disqus 模式。',d("dsqjs-post-container").innerHTML=t,d("dsqjs-reload-disqus").addEventListener("click",l),d("dsqjs-force-disqus").addEventListener("click",m)}}function u(){d("dsqjs-msg").innerHTML='评论基础模式加载失败,是否 重载尝试完整 Disqus 模式 ?',d("dsqjs-reload-dsqjs").addEventListener("click",o),d("dsqjs-reload-disqus").addEventListener("click",l)}function i(){n("dsqjs_mode","dsqjs"),o()}function m(){n("dsqjs_mode","disqus"),t()}var q=[];q.config=s,q.config.api=q.config.api||"https://disqus.skk.moe/disqus/",q.config.identifier=q.config.identifier||e.location.origin+e.location.pathname+e.location.search,q.config.url=q.config.url||e.location.origin+e.location.pathname+e.location.search,q.page=[],window.disqus_config=function(){this.page.url=q.config.url,this.page.identifier=q.config.identifier},q.mode=localStorage.getItem("dsqjs_mode"),"disqus"===q.mode?t():"dsqjs"===q.mode?o():l()}}); \ 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 n=document,p=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()},j=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");p("disqus_thread").innerHTML='
    评论完整模式加载中...如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或使用 评论基础模式
    ',p("dsqjs-force-dsqjs").addEventListener("click",r),s.src="https://".concat(v.config.shortname,".disqus.com/embed.js"),s.setAttribute("data-timestamp",+new Date),(n.head||n.body).appendChild(s)}function g(){p("disqus_thread").innerHTML='
    正在检查 Disqus 能否访问...
    ';for(var s=["disqus.com","".concat(v.config.shortname,".disqus.com")],n=0,o=0,a=function(){s.length===n&&n===o?h():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 模式 进行初始化?',p("dsqjs-force-disqus").addEventListener("click",h)):a()},function(s){a()})}();var t=function d(s){var c=p("dsqjs-load-more"),l=n.getElementsByClassName("dsqjs-order-radio"),u=function s(){var e=!0,t=!1,n=void 0;try{for(var o,a=l[Symbol.iterator]();!(e=(o=a.next()).done);e=!0)i=o.value,i.removeEventListener("change",m)}catch(s){t=!0,n=s}finally{try{e||null==a.return||a.return()}finally{if(t)throw n}}c.removeEventListener("click",s),d(v.page.next)},r=function(){s?(c.classList.remove("dsqjs-disabled"),c.innerHTML="加载更多评论失败,点击重试",c.addEventListener("click",u)):a()},m=function s(e){v.sortType=e.target.getAttribute("value"),j("disqus.sort",v.sortType);var t=!0,n=!1,o=void 0;try{for(var a,r=l[Symbol.iterator]();!(t=(a=r.next()).done);t=!0)i=a.value,i.removeEventListener("change",s)}catch(s){n=!0,o=s}finally{try{t||null==r.return||r.return()}finally{if(n)throw o}}c.removeEventListener("click",u),v.page.comment=[],v.page.next="",p("dsqjs-post-container").innerHTML='

    正在切换排序方式...

    ',c.classList.add("dsqjs-hide"),d()};s=s?"&cursor=".concat(s):"",c.classList.add("dsqjs-disabled");var q={parseDate:function(s){return Date.parse(new Date(s.createdAt))},parentAsc:function(s,e){return s.parent&&e.parent?q.parseDate(s)-q.parseDate(e):0}},e="".concat(v.config.api,"3.0/threads/listPostsThreaded?forum=").concat(v.config.shortname,"&thread=").concat(v.page.id).concat(s,"&api_key=").concat(y(),"&order=").concat(v.sortType);o(e,function(s){if(0===s.code&&0尝试完整 Disqus 模式 | 强制完整 Disqus 模式。',p("dsqjs-header").classList.remove("dsqjs-hide"),p("dsqjs-post-container").innerHTML='
    这里冷冷清清的,一条评论都没有
    ',p("dsqjs-reload-disqus").addEventListener("click",g),p("dsqjs-force-disqus").addEventListener("click",h)):r()},function(s){r()})},f=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='")),v.config.adminLabel&&s.isPrimary&&(s.comment.authorEl+=''.concat(v.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:!!v.config.admin&&s.author.username===v.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),"")}),p("dsqjs-header").classList.remove("dsqjs-hide"),p("dsqjs-msg").innerHTML='你可能无法访问 Disqus,已启用评论基础模式。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 尝试完整 Disqus 模式 | 强制完整 Disqus 模式。',p("dsqjs-post-container").innerHTML=n,p("dsqjs-reload-disqus").addEventListener("click",g),p("dsqjs-force-disqus").addEventListener("click",h)}}function a(){p("dsqjs-msg").innerHTML='评论基础模式加载失败,是否 重载尝试完整 Disqus 模式 ?',p("dsqjs-reload-dsqjs").addEventListener("click",t),p("dsqjs-reload-disqus").addEventListener("click",g)}function r(){j("dsqjs_mode","dsqjs"),t()}function h(){j("dsqjs_mode","disqus"),e()}Array.isArray||(Array.isArray=function(s){return"[object Array]"===Object.prototype.toString.call(s)});var v=[];v.config=s,v.config.api=v.config.api||"https://disqus.skk.moe/disqus/",v.config.identifier=v.config.identifier||n.location.origin+n.location.pathname+n.location.search,v.config.url=v.config.url||n.location.origin+n.location.pathname+n.location.search,v.page=[];var y=function(){return Array.isArray(v.config.apikey)?v.config.apikey[Math.floor(Math.random()*v.config.apikey.length)]:v.config.apikey};window.disqus_config=function(){this.page.url=v.config.url,this.page.identifier=v.config.identifier},v.mode=localStorage.getItem("dsqjs_mode"),v.sortType=localStorage.getItem("disqus.sort"),v.sortType||(j("disqus.sort","desc"),v.sortType="desc"),"disqus"===v.mode?e():"dsqjs"===v.mode?t():g()}}); \ No newline at end of file diff --git a/dist/disqusjs.css b/dist/disqusjs.css index 0dae899..eb851c4 100644 --- a/dist/disqusjs.css +++ b/dist/disqusjs.css @@ -1,6 +1,6 @@ /*! - * DisqusJS - Default Theme | v1.1.1 + * DisqusJS - Default Theme | v1.2.0 * 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;utf8,');background-position:50% 50%;background-repeat:no-repeat;display:inline-block;height:12px;width:65.7px} \ 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;utf8,');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 diff --git a/docs/index.html b/docs/index.html index 68e8574..9bb228d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -11,7 +11,7 @@ - +