From 340394da41d351659915b1d738e6e3bf438dfdec Mon Sep 17 00:00:00 2001 From: SukkaW <isukkaw@gmail.com> Date: Mon, 28 Jan 2019 00:11:45 +0800 Subject: [PATCH] release 1.1.1 --- dist/disqus.js | 4 ++-- dist/disqusjs.css | 2 +- docs/index.html | 4 ++-- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/disqus.js b/dist/disqus.js index cc3f88c..08aaefa 100644 --- a/dist/disqus.js +++ b/dist/disqus.js @@ -1,6 +1,6 @@ /*! - * DisqusJS | v1.1.0 + * DisqusJS | v1.1.1 * 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 d=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 l()},t.timeout=4500,t.ontimeout=function(s){n(s)},t.onerror=function(s){n(s)},t.send()},e=function(s,e){try{localStorage.setItem(s,e)}catch(s){}},c=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 n(){var s=document,e=s.createElement("script");s.getElementById("disqus_thread").innerHTML='<div id="dsqjs"><section><div id="dsqjs-msg">评论完整模式加载中...如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或使用 <a id="dsqjs-force-dsqjs" class="dsqjs-msg-btn">评论基础模式</a></div></section><footer><p class="dsqjs-footer">Powered by <a class="dsqjs-disqus-logo" href="https://disqus.com" rel="nofollow noopener noreferrer" target="_blank"></a> & <a href="https://github.com/SukkaW/DisqusJS" target="_blank">DisqusJS</a></p></footer>',s.getElementById("dsqjs-force-dsqjs").addEventListener("click",i),e.src="https://"+u.config.shortname+".disqus.com/embed.js",e.setAttribute("data-timestamp",+new Date),(s.head||s.body).appendChild(e)}function r(){for(var s=["disqus.com","".concat(u.config.shortname,".disqus.com")],t=0,o=0,a=function(){s.length===t&&t===o?m():s.length===t&&i()},e=0;e<s.length;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)}(s[e])}function t(){!function(){var s=document;s.getElementById("disqus_thread").innerHTML='<div id="dsqjs"><section><div id="dsqjs-msg"></div></section><header class="dsqjs-header dsqjs-hide" id="dsqjs-header"><nav class="dsqjs-nav dsqjs-clearfix"><ul><li class="dsqjs-nav-tab dsqjs-tab-active"><span><span id="dsqjs-comment-num"></span> Comments</span></li><li class="dsqjs-nav-tab"><span id="dsqjs-site-name"></span></li></ul></nav></header><section class="dsqjs-post-container"><ul class="dsqjs-post-list" id="dsqjs-post-container"></ul><a id="dsqjs-load-more" class="dsqjs-load-more dsqjs-hide">加载更多评论</a></section><footer><p class="dsqjs-footer">Powered by <a class="dsqjs-disqus-logo" href="https://disqus.com" rel="nofollow noopener noreferrer" target="_blank"></a> & <a href="https://github.com/SukkaW/DisqusJS" target="_blank">DisqusJS</a></p></footer></div>',s.getElementById("dsqjs-msg").innerHTML='评论基础模式加载中。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 <a id="dsqjs-reload-disqus" class="dsqjs-msg-btn">尝试完整 Disqus 模式</a> | <a id="dsqjs-force-disqus" class="dsqjs-msg-btn">强制完整 Disqus 模式</a>。',s.getElementById("dsqjs-reload-disqus").addEventListener("click",r),s.getElementById("dsqjs-force-disqus").addEventListener("click",m);var e="".concat(u.config.api,"3.0/threads/list.json?forum=").concat(u.config.shortname,"&thread=ident:").concat(u.config.identifier,"&api_key=").concat(u.config.apikey);d(e,function(s){var e=document;if(0===s.code&&1===s.response.length){var n=s.response[0];u.page={id:n.id,title:n.title,isClosed:n.isClosed,length:n.posts,comment:[]},e.getElementById("dsqjs-comment-num").innerHTML=u.page.length,u.config.siteName&&(e.getElementById("dsqjs-site-name").innerHTML=u.config.siteName),t()}else 0===s.code&&1!==s.response.length?(e.getElementById("dsqjs-msg").innerHTML='该 Thread 并没有初始化,是否 <a id="dsqjs-force-disqus" class="dsqjs-msg-btn">切换到完整 Disqus 模式</a> 进行初始化?',e.getElementById("dsqjs-force-disqus").addEventListener("click",m)):l()},function(s){l()})}();var t=function e(s){var n=function s(){t.removeEventListener("click",s),e(u.page.next)},t=document.getElementById("dsqjs-load-more");if(s)s="&cursor=".concat(s),o=function(){t.classList.remove("dsqjs-disabled"),t.innerHTML="加载更多评论失败,点击重试"};else{s="";var o=function(){l()}}t.classList.add("dsqjs-disabled");var a="".concat(u.config.api,"3.0/posts/list.json?forum=").concat(u.config.shortname,"&thread=").concat(u.page.id).concat(s,"&include=approved&include=deleted&api_key=").concat(u.config.apikey);d(a,function(s){if(0===s.code&&0<s.response.length)t.classList.remove("dsqjs-disabled"),u.page.comment=u.page.comment.concat(s.response),i(u.page.comment),s.cursor.hasNext?(u.page.next=s.cursor.next,t.innerHTML="加载更多评论",t.classList.remove("dsqjs-hide"),t.addEventListener("click",n)):t.classList.add("dsqjs-hide");else if(0===s.code&&0===s.response.length){var e=document;e.getElementById("dsqjs-msg").innerHTML='你可能无法访问 Disqus,已启用评论基础模式。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 <a id="dsqjs-reload-disqus" class="dsqjs-msg-btn">尝试完整 Disqus 模式</a> | <a id="dsqjs-force-disqus" class="dsqjs-msg-btn">强制完整 Disqus 模式</a>。',e.getElementById("dsqjs-header").classList.remove("dsqjs-hide"),e.getElementById("dsqjs-post-container").innerHTML='<div class="dsqjs-no-comment">这里冷冷清清的,一条评论都没有</div>',e.getElementById("dsqjs-reload-disqus").addEventListener("click",r),e.getElementById("dsqjs-force-disqus").addEventListener("click",m)}else o()},function(s){o()})},o=function(s){var e=[],a=[];return s.forEach(function(s){(s.parent?a:e).push(s)}),e.map(function(s){return{comment:s,author:s.author.name,isPrimary:!!u.config.admin&&s.author.username===u.config.admin,children:function s(e){if(0===a.length)return null;for(var n=[],t=0;t<a.length;t++){var o=a[t];o.parent===e&&n.unshift({comment:o,author:o.author.name,isPrimary:!!u.config.admin&&o.author.username===u.config.admin,children:s(+o.id)})}return n.length?n:null}(+s.id)}})},i=function(s){var a=function(s){return s.comment.author.profileUrl?(s.comment.avatarEl='<a href="'.concat(s.comment.author.profileUrl,'"><img src="').concat(s.comment.author.avatar.cache,'"></a>'),s.comment.authorEl='<span class="dsqjs-post-author"><a href="'.concat(s.comment.author.profileUrl,'" target="_blank" rel="nofollow noopener noreferrer">').concat(s.comment.author.name,"</a></span>")):(s.comment.avatarEl='<img src="'.concat(s.comment.author.avatar.cache,'">'),s.comment.authorEl='<span class="dsqjs-post-author">'.concat(s.comment.author.name,"</span>")),u.config.adminLabel&&s.isPrimary&&(s.comment.authorEl+='<span class="dsqjs-admin-badge">'.concat(u.config.adminLabel,"</span>")),s},i=function(s){if(s.isDeleted)var e="",n="<small>此评论已被删除</small>";else e="".concat(s.authorEl,'<span class="dsqjs-bullet"></span>'),n=s.message;var t,o,a;return'<div class="dsqjs-post-item dsqjs-clearfix"><div class="dsqjs-post-avatar">'.concat(s.avatarEl,'</div><div class="dsqjs-post-body"><div class="dsqjs-post-header">').concat(e,'<span class="dsqjs-meta"><time>').concat(c(s.createdAt),'</time></span></div><div class="dsqjs-post-content">').concat((t=n,o=new RegExp(/<a(.*?)href="https:\/\/disq\.us(.+?)"(.+?)>(.+?)<\/a>/gi),a=new RegExp(/href=\"(.+?)\"/gi),(t.match(o)||[]).map(function(s){var e=s.match(a)[0].replace(/href=\"https:\/\/disq.us\/url\?url=/g,"").replace(/(.*)"/,"$1");e=(e=decodeURIComponent(e)).replace(/(.*):(.*)cuid=(.*)/,"$1"),t=t.replace(s,'<a href="'.concat(e,'" rel="nofollow noopener noreferrer">').concat(e,"</a>"))}),t=t.replace(/href=/g,'target="_blank" href=')),"</div></div></div>")},e="";(s=o(s)).map(function(s){s.children&&(s.nesting=1),s=a(s),e+='<li data-id="comment-'.concat(s.comment.id,'">').concat(i(s.comment)).concat(function e(s){var n=s.nesting,t=s.children||[];if(t){var o=n<4?'<ul class="dsqjs-post-list dsqjs-children">':'<ul class="dsqjs-post-list">';return t.map(function(s){(s=a(s)).nesting=n+1,o+='<li data-id="comment-'.concat(s.comment.id,'">').concat(i(s.comment)).concat(e(s),"</li>")}),0!==(o+="</ul>").length?o:void 0}}(s),"</li>")});var n=document;n.getElementById("dsqjs-header").classList.remove("dsqjs-hide"),n.getElementById("dsqjs-msg").innerHTML='你可能无法访问 Disqus,已启用评论基础模式。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 <a id="dsqjs-reload-disqus" class="dsqjs-msg-btn">尝试完整 Disqus 模式</a> | <a id="dsqjs-force-disqus" class="dsqjs-msg-btn">强制完整 Disqus 模式</a>。',n.getElementById("dsqjs-post-container").innerHTML=e,n.getElementById("dsqjs-reload-disqus").addEventListener("click",r),n.getElementById("dsqjs-force-disqus").addEventListener("click",m)}}function l(){var s=document;s.getElementById("dsqjs-msg").innerHTML='评论基础模式加载失败,是否 <a id="dsqjs-reload-dsqjs" class="dsqjs-msg-btn">重载</a> 或 <a id="dsqjs-reload-disqus" class="dsqjs-msg-btn">尝试完整 Disqus 模式</a> ?',s.getElementById("dsqjs-reload-dsqjs").addEventListener("click",t),s.getElementById("dsqjs-reload-disqus").addEventListener("click",r)}function i(){e("dsqjs_mode","dsqjs"),t()}function m(){e("dsqjs_mode","disqus"),n()}var o,u=[];u.config=s,u.config.api=u.config.api||"https://disqus.skk.moe/disqus/",u.config.identifier=u.config.identifier||document.location.origin+document.location.pathname+document.location.search,u.config.url=u.config.url||document.location.origin+document.location.pathname+document.location.search,u.page=[],window.disqus_config=function(){this.page.url=u.config.url,this.page.identifier=u.config.identifier},u.mode=(o="dsqjs_mode",localStorage.getItem(o)),"disqus"===u.mode?n():"dsqjs"===u.mode?t():r()}}); \ 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 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='<div id="dsqjs"><section><div id="dsqjs-msg">评论完整模式加载中...如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或使用 <a id="dsqjs-force-dsqjs" class="dsqjs-msg-btn">评论基础模式</a></div></section><footer><p class="dsqjs-footer">Powered by <a class="dsqjs-disqus-logo" href="https://disqus.com" rel="nofollow noopener noreferrer" target="_blank"></a> & <a href="https://github.com/SukkaW/DisqusJS" target="_blank">DisqusJS</a></p></footer>',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='<div id="dsqjs"><section><div id="dsqjs-msg">正在检查 Disqus 能否访问...</div></section><footer><p class="dsqjs-footer">Powered by <a class="dsqjs-disqus-logo" href="https://disqus.com" rel="nofollow noopener noreferrer" target="_blank"></a> & <a href="https://github.com/SukkaW/DisqusJS" target="_blank">DisqusJS</a></p></footer></div>';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<s.length;n++)e(s[n])}function o(){!function(){d("disqus_thread").innerHTML='<div id="dsqjs"><section><div id="dsqjs-msg"></div></section><header class="dsqjs-header dsqjs-hide" id="dsqjs-header"><nav class="dsqjs-nav dsqjs-clearfix"><ul><li class="dsqjs-nav-tab dsqjs-tab-active"><span><span id="dsqjs-comment-num"></span> Comments</span></li><li class="dsqjs-nav-tab"><span id="dsqjs-site-name"></span></li></ul></nav></header><section class="dsqjs-post-container"><ul class="dsqjs-post-list" id="dsqjs-post-container"></ul><a id="dsqjs-load-more" class="dsqjs-load-more dsqjs-hide">加载更多评论</a></section><footer><p class="dsqjs-footer">Powered by <a class="dsqjs-disqus-logo" href="https://disqus.com" rel="nofollow noopener noreferrer" target="_blank"></a> & <a href="https://github.com/SukkaW/DisqusJS" target="_blank">DisqusJS</a></p></footer></div>',d("dsqjs-msg").innerHTML='评论基础模式加载中。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 <a id="dsqjs-reload-disqus" class="dsqjs-msg-btn">尝试完整 Disqus 模式</a> | <a id="dsqjs-force-disqus" class="dsqjs-msg-btn">强制完整 Disqus 模式</a>。',d("dsqjs-reload-disqus").addEventListener("click",l),d("dsqjs-force-disqus").addEventListener("click",m);var s="".concat(q.config.api,"3.0/threads/list.json?forum=").concat(q.config.shortname,"&thread=ident:").concat(q.config.identifier,"&api_key=").concat(q.config.apikey);c(s,function(s){if(0===s.code&&1===s.response.length){var e=s.response[0];q.page={id:e.id,title:e.title,isClosed:e.isClosed,length:e.posts,comment:[]},d("dsqjs-comment-num").innerHTML=q.page.length,q.config.siteName&&(d("dsqjs-site-name").innerHTML=q.config.siteName),n()}else 0===s.code&&1!==s.response.length?(d("dsqjs-msg").innerHTML='该 Thread 并没有初始化,是否 <a id="dsqjs-force-disqus" class="dsqjs-msg-btn">切换到完整 Disqus 模式</a> 进行初始化?',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<s.response.length?(n.classList.remove("dsqjs-disabled"),q.page.comment=q.page.comment.concat(s.response),i(q.page.comment),s.cursor.hasNext?(q.page.next=s.cursor.next,n.innerHTML="加载更多评论",n.classList.remove("dsqjs-hide"),n.addEventListener("click",t)):n.classList.add("dsqjs-hide")):0===s.code&&0===s.response.length?(d("dsqjs-msg").innerHTML='你可能无法访问 Disqus,已启用评论基础模式。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 <a id="dsqjs-reload-disqus" class="dsqjs-msg-btn">尝试完整 Disqus 模式</a> | <a id="dsqjs-force-disqus" class="dsqjs-msg-btn">强制完整 Disqus 模式</a>。',d("dsqjs-header").classList.remove("dsqjs-hide"),d("dsqjs-post-container").innerHTML='<div class="dsqjs-no-comment">这里冷冷清清的,一条评论都没有</div>',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='<a href="'.concat(s.comment.author.profileUrl,'"><img src="').concat(s.comment.author.avatar.cache,'"></a>'),s.comment.authorEl='<span class="dsqjs-post-author"><a href="'.concat(s.comment.author.profileUrl,'" target="_blank" rel="nofollow noopener noreferrer">').concat(s.comment.author.name,"</a></span>")):(s.comment.avatarEl='<img src="'.concat(s.comment.author.avatar.cache,'">'),s.comment.authorEl='<span class="dsqjs-post-author">'.concat(s.comment.author.name,"</span>")),q.config.adminLabel&&s.isPrimary&&(s.comment.authorEl+='<span class="dsqjs-admin-badge">'.concat(q.config.adminLabel,"</span>")),s},c=function(s){var n,e,t,o="",a="";return a=s.isDeleted?"<small>此评论已被删除</small>":(o="".concat(s.authorEl,'<span class="dsqjs-bullet"></span>'),s.message),'<div class="dsqjs-post-item dsqjs-clearfix"><div class="dsqjs-post-avatar">'.concat(s.avatarEl,'</div><div class="dsqjs-post-body"><div class="dsqjs-post-header">').concat(o,'<span class="dsqjs-meta"><time>').concat(r(s.createdAt),'</time></span></div><div class="dsqjs-post-content">').concat((n=a,e=new RegExp(/<a(.*?)href="https:\/\/disq\.us(.+?)"(.+?)>(.+?)<\/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,'<a href="'.concat(e,'" rel="nofollow noopener noreferrer">').concat(e,"</a>"))}),n=n.replace(/href=/g,'target="_blank" href=')),"</div></div></div>")},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<o.length;n++){var t=o[n];t.parent===s&&e.unshift(a(t))}return e.length?e:null},s.forEach(function(s){(s.parent?o:e).push(s)}),(s=e.map(function(s){return a(s)})).map(function(s){s.children&&(s.nesting=1),s=i(s),t+='<li data-id="comment-'.concat(s.comment.id,'" id="comment-').concat(s.comment.id,'">').concat(c(s.comment)).concat(function e(s){var n=s.nesting,t=s.children||[];if(t){var o=n<4?'<ul class="dsqjs-post-list dsqjs-children">':'<ul class="dsqjs-post-list">';return t.map(function(s){(s=i(s)).nesting=n+1,o+='<li data-id="comment-'.concat(s.comment.id,'" id="comment-').concat(s.comment.id,'">').concat(c(s.comment)).concat(e(s),"</li>")}),0!==(o+="</ul>").length?o:void 0}}(s),"</li>")}),d("dsqjs-header").classList.remove("dsqjs-hide"),d("dsqjs-msg").innerHTML='你可能无法访问 Disqus,已启用评论基础模式。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 <a id="dsqjs-reload-disqus" class="dsqjs-msg-btn">尝试完整 Disqus 模式</a> | <a id="dsqjs-force-disqus" class="dsqjs-msg-btn">强制完整 Disqus 模式</a>。',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='评论基础模式加载失败,是否 <a id="dsqjs-reload-dsqjs" class="dsqjs-msg-btn">重载</a> 或 <a id="dsqjs-reload-disqus" class="dsqjs-msg-btn">尝试完整 Disqus 模式</a> ?',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 diff --git a/dist/disqusjs.css b/dist/disqusjs.css index aebab82..0dae899 100644 --- a/dist/disqusjs.css +++ b/dist/disqusjs.css @@ -1,5 +1,5 @@ /*! - * DisqusJS - Default Theme | v1.1.0 + * DisqusJS - Default Theme | v1.1.1 * Author: SukkaW * Link: https://github.com/SukkaW/DisqusJS * License: MIT diff --git a/docs/index.html b/docs/index.html index 30f8bfb..68e8574 100644 --- a/docs/index.html +++ b/docs/index.html @@ -11,7 +11,7 @@ <link href="https://cdn.jsdelivr.net/npm/skx@0.0.1/favicon/favicon-32x32.png" rel="icon" type="image/png" sizes="32x32"> <link href="https://cdn.jsdelivr.net/npm/skx@0.0.1/favicon/favicon-16x16.png" rel="icon" type="image/png" sizes="16x16"> <link href="https://cdn.jsdelivr.net/npm/skx@0.0.1" rel="shortcut icon" type="image/ico"> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/disqusjs@1.1.0/dist/disqusjs.css"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/disqusjs@1.1.1/dist/disqusjs.css"> <script src="https://cdn.jsdelivr.net/npm/vconsole"></script> <script>var vConsole = new VConsole();</script> <style> @@ -94,7 +94,7 @@ <div class="comment-container"> <div id="disqus_thread"></div> </div> - <script src="https://cdn.jsdelivr.net/npm/disqusjs@1.1.0/dist/disqus.js"></script> + <script src="https://cdn.jsdelivr.net/npm/disqusjs@1.1.1/dist/disqus.js"></script> <script> var dsqjs = new DisqusJS({ shortname: 'sukas-blog', diff --git a/package.json b/package.json index 3f77559..eee51d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "disqusjs", - "version": "1.1.0", + "version": "1.1.1", "description": "Alternative DISQUS - Render comments components from Disqus API", "main": "dist/disqus.js", "scripts": {