mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-11-06 11:22:23 +00:00
44 lines
66 KiB
JavaScript
44 lines
66 KiB
JavaScript
|
(function () {
|
||
|
'use strict';
|
||
|
var _config = window.disqus_config;
|
||
|
window.disqus_config = function () {
|
||
|
if (_config) {
|
||
|
try {
|
||
|
_config.call(this);
|
||
|
} catch(err) {
|
||
|
console.error('There was a problem with the Disqus configuration.', err);
|
||
|
}
|
||
|
}
|
||
|
this.server_side = {
|
||
|
"inthread_show_after_comment":"3",
|
||
|
"inthread_repeat_comment_count":"8",
|
||
|
"default_placement_url":"https://disqusservice.com/iframe/fallback/?shortname=brianbuccola",
|
||
|
"inthread_placement_url":"",
|
||
|
"can_disable_ads":"",
|
||
|
"lazyload_viewports":"2",
|
||
|
"service":"dynamic",
|
||
|
"experiment":"network_default_hidden",
|
||
|
"inthread_count_children":"True",
|
||
|
"inthread_multiple_ads":"True",
|
||
|
"bin":"embed:promoted_discovery:dynamic:network_default_hidden:fallthrough",
|
||
|
"bottom_placement_url":"",
|
||
|
"variant":"fallthrough",
|
||
|
"forum_id":"3904362",
|
||
|
"top_placement_url":"",
|
||
|
"inthread_minimum_comment_count":"4",
|
||
|
"inthread_trailing_comment_count":"0",
|
||
|
"is_private":"1",
|
||
|
"forum":{
|
||
|
"id":3904362,
|
||
|
"disable_disqus_branding":false
|
||
|
},
|
||
|
"sandbox_ads":"1",
|
||
|
"inthread_leading_comment_count":"1",
|
||
|
"t":"1584623604"
|
||
|
};
|
||
|
};
|
||
|
})();
|
||
|
!function(a,b){function c(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea={},fa={},ga={},ha={},ia={},ja={},ka={},la={},ma={};e=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},f=function(a){return function(b,c){var d=b.length,e=Array.prototype.forEach;if(isNaN(d))for(var f in b)a(b,f)&&c(b[f],f,b);else if(e)e.call(b,c);else for(var g=0;g<d;g++)c(b[g],g,b)}}(e),ea=function(a){var c=f;return a=function(a){var d=[];return c(a,function(a,c){a!==b&&d.push(encodeURIComponent(c)+(null===a?"":"="+encodeURIComponent(a)))}),d.join("&")}}(ea),fa=function(a){var b=ea;return a=function c(a,d,e){if(d&&(a.indexOf("?")===-1?a+="?":"&"!==a.charAt(a.length-1)&&(a+="&"),a+=b(d)),e){var f={};return f[(new Date).getTime()]=null,c(a,f)}var g=a.length;return"&"===a.charAt(g-1)?a.slice(0,g-1):a}}(fa),ga=function(b){var c=fa,d=a.document,e=d.head||d.getElementsByTagName("head")[0]||d.body;return b=function(a,b,f,g){var h=d.createElement("script");h.src=c(a,b,f),h.async=!0,h.charset="UTF-8",h.onload=g,e.appendChild(h)}}(ga),g=function(){var b="adsbox",c=100,d=a.document;return function(a){if(a){var e=d.createElement("div");e.innerHTML=" ",e.className=b,d.body.appendChild(e),setTimeout(function(){a(0===e.offsetHeight),d.body.removeChild(e)},c)}}}(),h=function(a){try{return a.self!==a.top}catch(b){return!0}},i=function(a,b){return function(c){return a(Array.prototype.slice.call(arguments,1),function(a){for(var d in a)b(a,d)&&(c[d]=a[d])}),c}}(f,e),j=function(c){function d(a){var b=a.split("."),c=b.length>2?b[b.length-2]:"";return c.match(/^[0-9a-f]{32}$/i)&&c}function e(b){(new a.Image).src=j(k+"/stat.gif",{event:b})}function g(b){(new a.Image).src=j(k+"/event.gif",b)}function h(c){var d=new a.URLSearchParams;i(c,function(a,c){a!==b&&d.append(c,a)});var e=new a.XMLHttpRequest;e.open("POST",k+"/event.json",!0),e.withCredentials=!0,e.send(d)}var i=f,j=fa,k="https://referrer.disqus.com/juggler";return{getLoaderVersionFromUrl:d,logStat:e,reportJester:g,reportJesterPOST:h}}({}),k=function(){function b(b){b=b||{};var c=b.Math||a.Math,d=b.Date||a.Date;try{var e=(new d).getTimezoneOffset(),f=1,g=a.screen;g&&g.availWidth?f=g.availWidth*g.availHeight+g.colorDepth:g&&g.width&&(f=g.width*g.height);var h=a.document.documentElement,i=h.clientWidth*h.clientHeight;return c.abs(17*e+25*f-i)}catch(j){return 1}}return{get:b}}(),l=function(b){function c(b){b=b||{};var c=b.Uint32Array||a.Uint32Array,d=b.crypto||a.crypto,e=b.Math||a.Math;try{var f=new c(1);return d.getRandomValues(f),f[0]}catch(g){return e.floor(1e9*e.random())}}function d(){var b=a.performance,c=b&&b.timing;if(!c)return 1e5;var d=c.domainLookupEnd-c.domainLookupStart,e=c.connectEnd-c.connectStart,f=c.responseStart-c.navigationStart;return 11*d+13*e+17*f}function e(e){e=e||{};var f=e.Math||a.Math,g=Number((new Date).getTime().toString().substring(3)),h=f.abs(g+d()-b.get()).toString(32);return h+=c(e).toString(32)}return{generate:e}}(k),m=function(b){var c=a.document,d=c.createElement("iframe");return d.style.display="none",function(a,b){var e=b&&b[a]||null;try{return d.parentNode!==c.body&&c.body.appendChild(d),d.contentWindow[a]||e}catch(f){return e}}}({}),n=function(){var c={isIE:function(){return Boolean(a.document.documentMode)},isSafari:function(){var b=a.navigator.userAgent.toLowerCase();return b.indexOf("safari")>-1&&b.indexOf("chrome")===-1},isFirefox:function(){var b=a.navigator.userAgent.toLowerCase();return b.indexOf("firefox")>-1&&b.indexOf("chrome")===-1},isChrome:function(){var c=a.navigator.userAgent.toLowerCase();return c.indexOf("crios")>-1||Boolean(a.chrome)&&"Google Inc."===a.navigator.vendor&&a.opr===b&&c.indexOf("edge")===-1},isEdge:function(){var b=a.navigator.userAgent.toLowerCase();return b.indexOf
|
||
|
this.frame.elem&&this.frame.elem.focus()},"state:LOADED":function(){this.frame.removeInlineStyle("visibility")},"frame:after:render":function(){e.browser.isSafari()&&this.triggerHostReflow()}},preventScrolling:function(){var a=this.getBodyOverflow(),b=h.body.style.marginRight,d=h.documentElement.style,e=d.overflow;this.listenToOnce(this,"frame:close",function(){this.setBodyStyles({overflow:a,marginRight:b}),d.overflow=e}),this.setBodyStyles({overflow:"hidden",marginRight:this.calcMargin(c(h.body,"margin-right","marginRight")||b)}),d.overflow="hidden"},triggerHostReflow:function(){var a=h.createElement("style");h.body.appendChild(a),h.body.removeChild(a)},calcMargin:function(a){var b=a.match(i);return b&&(a=b[1]),a?"calc("+a+" + "+e.getScrollbarWidth()+"px)":e.getScrollbarWidth()+"px"},setBodyStyles:function(a){for(var b in a)h.body.style[b]=a[b]},getBodyOverflow:function(){return h.body.style.overflow},getSecureOrigin:function(){return f.ensureHTTPSProtocol(j.SECURE_HOME_URL).split("/").slice(0,3).join("/")},getFrameSettings:function(){var a=g.prototype.getFrameSettings.call(this);return a.role="dialog",a.origin=this.getSecureOrigin(),a.styles={height:"100%",position:"fixed",top:0,right:0,left:"auto",bottom:"auto","z-index":e.MAX_Z_INDEX,visibility:"hidden"},a},getUrl:function(){var a=this.settings.path||"",b=this.settings.language,c={utm_source:"disqus_embed"};return b&&"en"!==b&&(c.l=b),d(f.apps[this.name]+a,c)},show:function(a){if(!this.frame.isReady())return void this.once("frame:ready",function(){this.show(a)},this);var b={disableMOTD:this.settings.disableMOTD,path:a};this.settings.sso&&(b.sso=this.settings.sso),this.frame.sendMessage("showPath",b)}},{SECURE_HOME_URL:"https://disqus.com/home/",READY_TIMEOUT:1e4,getInstanceOrLoad:function(a){var b=j.instance;return b?b:(b=j.instance=new j(a),a.preload&&b.listenToOnce(b,"state:INIT",function(){b.frame.hide()}),j.setHomeTimeout(b),b.init(),a.forum&&b.listenToOnce(b,"frame:ready",function(){b.frame.sendMessage("setForum",a.forum)}),b)},setHomeTimeout:function(a){j.homeTimeoutId&&clearTimeout(j.homeTimeoutId);var b=j.homeTimeoutId=setTimeout(function(){a.frame.destroy(),a.trigger("timeout")},j.READY_TIMEOUT);a.listenToOnce(a,"state:READY",function(){clearTimeout(b)})},preload:function(a){return a.preload=!0,j.getInstanceOrLoad(a)},destroy:function(){var a=j.instance;a&&(a.destroy(),j.instance=null)},show:function(a){var b=j.getInstanceOrLoad(a);return b.show(a.path),b}});return{show:j.show,preload:j.preload,destroy:j.destroy,HomeApp:j}}({}),L=function(a){var b=i,c={height:"52px",width:"54px",margin:"0 auto",overflow:"hidden",position:"relative",boxingSize:"border-box"},d=function(a){var d=a?"0 -52px ":"";return b({background:"url(https://c.disquscdn.com/next/embed/assets/img/loader-bg.173909e4737a7481df14d5492b5eeb48.png) "+d+"no-repeat"},c)},e="https://c.disquscdn.com/next/embed/assets/img/disqus-social-icon-light.db220ca78b54cb3f7deceb0ff1eaa2e8.svg",f="https://c.disquscdn.com/next/embed/assets/img/disqus-social-icon-dark.9a297ec866f5b7eed39d90aa34a38e85.svg",g={display:"block",margin:"auto",width:"80px",height:"80px"},h=function(a){var c=a?e:f;return b({background:"url("+c+") center center / contain no-repeat"},g)};return{getBubbleStyle:d,getIconStyle:h}}({}),M=function(){var b={_doc:a.document,create:function(a,c,d){d||(d={});var e=a+"="+c+"; path="+(d.path||"/"),f=d.domain,g=d.expiresIn;if(f&&(e+="; domain=."+f),"[object Number]"===Object.prototype.toString.call(g)){var h=new Date((new Date).getTime()+g);e+="; expires="+h.toGMTString()}"https:"===b._doc.location.protocol&&(e+="; secure"),e+="; SameSite=None",b._doc.cookie=e},read:function(a){for(var c,d=a+"=",e=b._doc.cookie.split(";"),f=0;f<e.length;f++)if(c=e[f].replace(/^\s+/,""),0===c.indexOf(d))return c.substring(d.length);return null},erase:function(a,c){var d={};for(var e in c)c.hasOwnProperty(e)&&(d[e]=c[e]);return d.expiresIn=-1,b.create(a,"",d)},supported:function(){return b.create("cookie_support","1"),"1"===b.read("cookie_support")&&(b.erase("cookie_support"),!0)}};return b}(),ia=function(b){var c=M,d=l
|
||
|
this._reportOnceHistory[b]=!0)},getFrameSettings:function(){var a=e.prototype.getFrameSettings.call(this);return a.insertBeforeEl=this.settings.insertBeforeEl,a.insertAfterEl=this.settings.insertAfterEl,a}}),y=function(a){return new x(a)};return{Ads:y}}({}),ma=function(c){var d=g,e=h,f=i,k=fa,l=j,m=t.HostConfig,n=u,o=N,p=ca,q=new m(a);c.configAdapter=q;var r=[],s=!1,v=e(a),w=c.removeDisqusLink=function(){var b=a.document;if(b.getElementsByClassName){if("complete"!==b.readyState)return a.addEventListener("load",w);var c=b.getElementsByClassName("dsq-brlink"),d=c&&c.length&&c[0];d&&d.parentNode.removeChild(d)}};c.VERSION="d5ca3c0",c.loadEmbed=function(a){if(r.length)return z({reload:!0}),n.log("Use DISQUS.reset instead of reloading embed.js please."),void n.log("See https://help.disqus.com/customer/portal/articles/472107-using-disqus-on-ajax-sites");q.configurator=a;var b=q.toJSON();b.version=c.VERSION,s||(b.container.innerHTML="",s=!0),c.loadApps(b),c.removeDisqusLink()};var x=function(){for(var a;a=r.pop();)a.triggeredSlowEvent&&a.state!==a.constructor.states.RUNNING&&l.logStat("reset_embed.slow"),a.destroy()},y=function(a){x();var b=o.Lounge(f({},a,{discoveryDisabled:a.bottomPlacementUrl&&!a.homeDiscoveryEnabled,isHostIframed:v}));r.push(b),b.init();var c=function(a){b.whenFullyVisible(a)},d=function(b,c){return a.adBlockEnabled&&a.defaultPlacementUrl&&(b=k(a.defaultPlacementUrl,{position:c})),b},e=null;if(a.topPlacementUrl&&(a.topPlacementUrl=d(a.topPlacementUrl,"top"),e=p.Ads(f({adUrl:a.topPlacementUrl,placement:"top"},a,{isHostIframed:v,insertBeforeEl:b.frame.elem})),r.push(e),c(function(){e.init()})),a.bottomPlacementUrl&&!a.homeDiscoveryEnabled){a.bottomPlacementUrl=d(a.bottomPlacementUrl,"bottom");var g=p.Ads(f({adUrl:a.bottomPlacementUrl,placement:"bottom"},a,{isHostIframed:v,insertAfterEl:b.frame.elem}));r.push(g),c(function(){null===e?g.init():g.listenToOnce(e,"frame:ready",function(){g.init()})})}};c.loadApps=function(a){a.adBlockEnabled===b?d(function(b){a.adBlockEnabled=b,y(a)}):y(a)};var z=c.reset=function(a){a=a||{},x(),a.reload&&c.loadEmbed(a.config)};return c}(ma),da=function(b){var c=a.document,d=a.DISQUS||{},e=ga;d.reset||(d.reset=ma.reset),d.request||(d.request={}),d.request.get||(d.request.get=function(a,b,c){e(a,b,c)}),d.host||(d.host={}),d.host._loadEmbed||(d.host._loadEmbed=ma.loadEmbed),a.DISQUS=d;var f=function(a,b){var d=c.createElement("link");return d.rel="prefetch",d.as=b||"script",d.pr=1,d.href=a,c.head.appendChild(d),d};f("https://c.disquscdn.com/next/embed/styles/lounge.91790a929b2fba6bf8967d2204d948d5.css","style"),f("https://c.disquscdn.com/next/embed/common.bundle.b9167d06dc7bd01b59d6d6332d6aafa1.js"),f("https://c.disquscdn.com/next/embed/lounge.bundle.b9f55e00ac59a682cfbac91eadf883d4.js"),f("https://disqus.com/next/config.js")}({})}(this),this.DISQUS.host._loadEmbed();
|