Guest User

Licznik nawróceń

a guest
Dec 10th, 2018
1,298
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !function(e){var t={};function n(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(o,s,function(t){return e[t]}.bind(null,s));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}({10:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.EngineEvent=class{constructor(e,t,n){this.name=t,this.type=e,this.callback=n}}},8:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(9),s=window.API.Storage,r="converted-counter",i=new o.default,c=new window.API.Window,u=document.createElement("style"),a=s.get(r,{success:0,failure:0,pos:{x:0,y:0}});function d(){const{failure:e,success:t}=a;document.getElementById("converted-trials").innerText=e+t,document.getElementById("converted-successes").innerText=t,s.set(r,a)}u.appendChild(document.createTextNode("\n  #converted-counter {\n    margin-top: 11px;\n    color: white;\n  }\n")),document.head.appendChild(u),c.setTransparentWindon(),c.setSavePosWnd(r,a.pos),c.updatePos(),c.title("Licznik nawróceń"),c.content('\n  <div id="converted-counter">\n    <div>\n      Prób: <span id="converted-trials"></span>\n    </div>\n    <div>\n      Sukcesów: <span id="converted-successes"></span>\n    </div>\n  </div>\n'),document.getElementsByClassName("alerts-layer")[0].appendChild(c.$[0]),d(),i.on("new-dialogue","akh-mater",e=>e.some(e=>/To nie cukierki, człowieczku\. Proroctwa Akhmater to jedyna prawda!/.test(e))||e.some(e=>/Kolejni głupcy nawróceni na jedyne słowa prawdy! Przyjdź do mnie jutro!/.test(e))?(a.success=a.failure=0,void d()):e.includes("Sukces!")?(a.success++,void d()):void(e.includes("Niepowodzenie!")&&(a.failure++,d())))},9:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(10);t.default=class{constructor(){this.events=new Map,this.listen()}off(e){return this.events.delete(e),this}offType(e){return this.events.forEach((t,n,o)=>{e===t.type&&o.delete(n)}),this}on(e,t,n){return this.events.set(t,new o.EngineEvent(e,t,n)),this}emit(e,t){return this.events.forEach(n=>{e===n.type&&n.callback(t)}),this}listen(){const e=XMLHttpRequest.prototype.send,t=this;XMLHttpRequest.prototype.send=function(){const n=this.onreadystatechange;this.onreadystatechange=function(){4===this.readyState&&this.responseURL.includes("margonem.pl/engine")&&t.onEngineResponse(JSON.parse(this.response)),n&&n.apply(this,arguments)},e.apply(this,arguments)}}onEngineResponse(e){new Map([["d","new-dialogue"]]).forEach((t,n)=>{!0===e.hasOwnProperty(n)&&this.emit(t,e[n])})}}}});
RAW Paste Data