diff --git a/js/dist/admin.js b/js/dist/admin.js
index e2567fe..5e459b2 100644
--- a/js/dist/admin.js
+++ b/js/dist/admin.js
@@ -1,2 +1,2 @@
-module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}({2:function(t,e){t.exports=flarum.extensions["fof-components"]},9:function(t,e,n){"use strict";n.r(e);var r=n(2),o=r.settings.SettingsModal,i=r.settings.items.BooleanItem,a=[["facebook","twitter","linkedin","reddit"],["whatsapp","telegram"],["vkontakte","odnoklassniki","my_mail"],["qq","qzone"]];app.initializers.add("fof/share-social",(function(){app.extensionSettings["fof-share-social"]=function(){return app.modal.show(o,{title:app.translator.trans("fof-share-social.admin.settings.title"),className:"FofShareSocialSettingsModal",size:"small",items:function(t){return[].concat(a.map((function(e){return e.map((function(e){return m(i,{setting:t,name:"fof-share-social.networks."+e},app.translator.trans("fof-share-social.lib.networks."+e))}))})))}})}}))}});
+module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}({2:function(e,t){e.exports=flarum.core.compat.app},9:function(e,t,r){"use strict";r.r(t);var n=r(2),o=r.n(n),a=[["facebook","twitter","linkedin","reddit"],["whatsapp","telegram"],["vkontakte","odnoklassniki","my_mail"],["qq","qzone"]];o.a.initializers.add("fof/share-social",(function(){var e=o.a.extensionData.for("fof-share-social");a.forEach((function(t){return t.forEach((function(t){return e.registerSetting({label:o.a.translator.trans("fof-share-social.lib.networks."+t),setting:"fof-share-social.networks."+t,type:"boolean"})}))}))}))}});
//# sourceMappingURL=admin.js.map
\ No newline at end of file
diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map
index 4cf703a..36a8383 100644
--- a/js/dist/admin.js.map
+++ b/js/dist/admin.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack://@fof/share-social/webpack/bootstrap","webpack://@fof/share-social/external \"flarum.extensions['fof-components']\"","webpack://@fof/share-social/./src/admin/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","extensions","SettingsModal","settings","BooleanItem","items","networks","app","initializers","add","extensionSettings","modal","show","title","translator","trans","className","size","map","network","setting"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WAC7B,WAAwB,OAAOrB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAH,EAAoBU,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRZ,EAAoBa,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,G,kBClFrDhC,EAAOD,QAAUkC,OAAOC,WAAW,mB,iDCE/BC,EAEAC,WAFAD,cACSE,EACTD,WADAE,MAASD,YAGPE,EAAW,CACb,CAAC,WAAY,UAAW,WAAY,UACpC,CAAC,WAAY,YACb,CAAC,YAAa,gBAAiB,WAC/B,CAAC,KAAM,UAGXC,IAAIC,aAAaC,IAAI,oBAAoB,WACrCF,IAAIG,kBAAkB,oBAAsB,kBACxCH,IAAII,MAAMC,KACNV,EAAe,CACXW,MAAON,IAAIO,WAAWC,MAAM,yCAC5BC,UAAW,8BACXC,KAAM,QACNZ,MAAO,SAAAN,GAAC,gBACDO,EAASY,KAAI,SAAAZ,GAAQ,OACpBA,EAASY,KAAI,SAAAC,GAAO,OAChB,EAACf,EAAD,CAAagB,QAASrB,EAAGxB,KAAI,6BAA+B4C,GACvDZ,IAAIO,WAAWC,MAAf,iCAAsDI","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 9);\n","module.exports = flarum.extensions['fof-components'];","import { settings } from '@fof-components';\nconst {\n SettingsModal,\n items: { BooleanItem },\n} = settings;\n\nconst networks = [\n ['facebook', 'twitter', 'linkedin', 'reddit'],\n ['whatsapp', 'telegram'],\n ['vkontakte', 'odnoklassniki', 'my_mail'],\n ['qq', 'qzone'],\n];\n\napp.initializers.add('fof/share-social', () => {\n app.extensionSettings['fof-share-social'] = () =>\n app.modal.show(\n SettingsModal, {\n title: app.translator.trans('fof-share-social.admin.settings.title'),\n className: 'FofShareSocialSettingsModal',\n size: 'small',\n items: s=> [\n ...networks.map(networks =>\n networks.map(network => (\n \n {app.translator.trans(`fof-share-social.lib.networks.${network}`)}\n \n ))\n ),\n ],\n }\n );\n});\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack://@fof/share-social/webpack/bootstrap","webpack://@fof/share-social/external \"flarum.core.compat['app']\"","webpack://@fof/share-social/./src/admin/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","networks","app","initializers","add","set","extensionData","forEach","network","registerSetting","label","translator","trans","setting","type"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX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BAAgB,CAChBC,MAAOR,IAAIS,WAAWC,MAAf,iCAAsDJ,GAC7DK,QAAS,6BAA6BL,EACtCM,KAAM","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 9);\n","module.exports = flarum.core.compat['app'];","import app from 'flarum/app';\n\nconst networks = [\n ['facebook', 'twitter', 'linkedin', 'reddit'],\n ['whatsapp', 'telegram'],\n ['vkontakte', 'odnoklassniki', 'my_mail'],\n ['qq', 'qzone'],\n];\n\napp.initializers.add('fof/share-social', () => {\n let set = app.extensionData.for('fof-share-social');\n\n networks.forEach(networks =>\n networks.forEach(network =>\n set.registerSetting({\n label: app.translator.trans(`fof-share-social.lib.networks.${network}`),\n setting: `fof-share-social.networks.${network}`,\n type: 'boolean',\n })\n )\n );\n});\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map
index c3b1112..4276366 100644
--- a/js/dist/forum.js.map
+++ b/js/dist/forum.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack://@fof/share-social/webpack/bootstrap","webpack://@fof/share-social/external \"flarum.core.compat['components/Button']\"","webpack://@fof/share-social/external \"flarum.core.compat['utils/string']\"","webpack://@fof/share-social/external \"flarum.core.compat['extend']\"","webpack://@fof/share-social/external \"flarum.core.compat['components/DiscussionPage']\"","webpack://@fof/share-social/external \"flarum.core.compat['components/Modal']\"","webpack://@fof/share-social/./node_modules/pupa/index.js","webpack://@fof/share-social/./node_modules/escape-goat/index.js","webpack://@fof/share-social/./src/forum/components/ShareModal.js","webpack://@fof/share-social/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/share-social/./src/forum/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","htmlEscape","require","template","data","TypeError","doubleBraceRegex","test","replace","_","result","split","String","string","htmlUnescape","htmlString","htmlEscapeTag","strings","output","htmlUnescapeTag","shareUrls","facebook","twitter","linkedin","reddit","whatsapp","telegram","vkontakte","odnoklassniki","my_mail","qq","qzone","shareIcons","ShareModal","subClass","superClass","constructor","__proto__","oninit","vdom","this","networks","attrs","discussion","className","title","app","translator","trans","content","url","encodeURIComponent","forum","attribute","route","id","description","firstPost","truncate","getPlainContent","contentHtml","windowParams","$","window","height","width","map","network","Button","component","icon","onclick","open","pupa","Modal","initializers","add","extend","DiscussionPage","items","keys","filter","k","startsWith","Number","length","modal","show"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN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AAsDmB,W,GAvC7CO,KEvBxC5B,IAAI6B,aAAaC,IAAI,oBAAoB,WACrCC,iBAAOC,IAAepF,UAAW,gBAAgB,SAASqF,GAAO,WAEvDtC,EAAWjE,OAAOwG,KAAKlC,IAAI1C,MAC5B6E,QAAO,SAAAC,GAAC,OAAIA,EAAEC,WAAW,+BAAiCC,OAAOtC,IAAI1C,KAAK8E,OAC1EhB,KAAI,SAAAgB,GAAC,OAAIA,EAAE1E,QAHD,6BAGiB,OAE5BiC,EAAS4C,QACTN,EAAMH,IACF,eACAR,IAAOC,UAAU,CACbzB,UAAW,mCACX0B,KAAM,mBACNC,QAAS,kBACLzB,IAAIwC,MAAMC,KACNtD,EAAY,CACRQ,WACAE,WAAY,EAAKA,eAG9BG,IAAIC,WAAWC,MAAM,oDACvB","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['utils/string'];","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['components/DiscussionPage'];","module.exports = flarum.core.compat['components/Modal'];","'use strict';\nconst {htmlEscape} = require('escape-goat');\n\nmodule.exports = (template, data) => {\n\tif (typeof template !== 'string') {\n\t\tthrow new TypeError(`Expected a \\`string\\` in the first argument, got \\`${typeof template}\\``);\n\t}\n\n\tif (typeof data !== 'object') {\n\t\tthrow new TypeError(`Expected an \\`object\\` or \\`Array\\` in the second argument, got \\`${typeof data}\\``);\n\t}\n\n\tconst doubleBraceRegex = /{{(.*?)}}/g;\n\n\tif (doubleBraceRegex.test(template)) {\n\t\ttemplate = template.replace(doubleBraceRegex, (_, key) => {\n\t\t\tlet result = data;\n\n\t\t\tfor (const property of key.split('.')) {\n\t\t\t\tresult = result ? result[property] : '';\n\t\t\t}\n\n\t\t\treturn htmlEscape(String(result));\n\t\t});\n\t}\n\n\tconst braceRegex = /{(.*?)}/g;\n\n\treturn template.replace(braceRegex, (_, key) => {\n\t\tlet result = data;\n\n\t\tfor (const property of key.split('.')) {\n\t\t\tresult = result ? result[property] : '';\n\t\t}\n\n\t\treturn String(result);\n\t});\n};\n","'use strict';\n\nexports.htmlEscape = string => string\n\t.replace(/&/g, '&')\n\t.replace(/\"/g, '"')\n\t.replace(/'/g, ''')\n\t.replace(//g, '>');\n\nexports.htmlUnescape = htmlString => htmlString\n\t.replace(/>/g, '>')\n\t.replace(/</g, '<')\n\t.replace(/?39;/g, '\\'')\n\t.replace(/"/g, '\"')\n\t.replace(/&/g, '&');\n\nexports.htmlEscapeTag = (strings, ...values) => {\n\tlet output = strings[0];\n\tfor (let i = 0; i < values.length; i++) {\n\t\toutput = output + exports.htmlEscape(String(values[i])) + strings[i + 1];\n\t}\n\n\treturn output;\n};\n\nexports.htmlUnescapeTag = (strings, ...values) => {\n\tlet output = strings[0];\n\tfor (let i = 0; i < values.length; i++) {\n\t\toutput = output + exports.htmlUnescape(String(values[i])) + strings[i + 1];\n\t}\n\n\treturn output;\n};\n","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\nimport { truncate } from 'flarum/utils/string';\nimport { getPlainContent } from 'flarum/utils/string';\n\nimport pupa from 'pupa';\n\nconst shareUrls = {\n facebook: '//facebook.com/sharer/sharer.php?u={url}',\n twitter: '//twitter.com/share?url={url}&text={title}',\n linkedin: '//linkedin.com/shareArticle?mini=true&url={url}&title={title}&summary={description}',\n reddit: '//www.reddit.com/submit?url={url}&title={title}',\n whatsapp: '//wa.me/?text={title}%20{url}',\n telegram: '//telegram.me/share/url?url={url}&text={title}',\n\n vkontakte: '//vk.com/share.php?url={url}&title={title}&description={description}',\n odnoklassniki: '//connect.ok.ru/offer?url={url}',\n my_mail: '//connect.mail.ru/share?url={url}&title={title}&description={description}',\n qq: '//connect.qq.com/widget/shareqq/iframe_index.html?url={url}&title={title}',\n qzone: '//sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={url}&summary={description}&title={title}',\n};\n\nconst shareIcons = {\n vkontakte: 'fab fa-vk',\n my_mail: 'fas fa-at',\n qq: 'fab fa-qq',\n qzone: 'fas fa-star',\n};\n\nexport default class ShareModal extends Modal {\n oninit(vdom) {\n super.oninit(vdom);\n\n this.networks = this.attrs.networks;\n this.discussion = this.attrs.discussion;\n }\n\n className() {\n return 'FofShareSocialModal Modal--small';\n }\n\n title() {\n return app.translator.trans('fof-share-social.forum.modal.title');\n }\n\n content() {\n const url = encodeURIComponent(app.forum.attribute('baseUrl') + app.route('discussion', { id: this.discussion.id() }));\n const title = encodeURIComponent(app.title);\n const description = this.discussion.firstPost()\n ? encodeURIComponent(truncate(getPlainContent(this.discussion.firstPost().contentHtml()), 150, 0))\n : '';\n const data = { url, title, description };\n\n const width = 1000;\n const height = 500;\n const top = $(window).height() / 2 - height / 2;\n const left = $(window).width() / 2 - width / 2;\n const windowParams = `width=${width}, height= ${height}, top=${top}, left=${left}, status=no, scrollbars=no, resizable=no`;\n\n return (\n
\n
\n
\n {this.networks.map(network =>\n Button.component({\n className: `Button Button--rounded Button--block Share--${network}`,\n icon: `${shareIcons[network] || `fab fa-${network}`} fa-lg fa-fw`,\n onclick: () => window.open(pupa(shareUrls[network], data), app.title, windowParams),\n }, app.translator.trans(`fof-share-social.lib.networks.${network}`))\n )}\n
\n
\n
\n );\n }\n}\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import { extend } from 'flarum/extend';\nimport DiscussionPage from 'flarum/components/DiscussionPage';\nimport Button from 'flarum/components/Button';\n\nimport ShareModal from './components/ShareModal';\n\napp.initializers.add('fof/share-social', () => {\n extend(DiscussionPage.prototype, 'sidebarItems', function(items) {\n const prefix = 'fof-share-social.networks.';\n const networks = Object.keys(app.data)\n .filter(k => k.startsWith('fof-share-social.networks.') && Number(app.data[k]))\n .map(k => k.replace(prefix, ''));\n\n if (networks.length) {\n items.add(\n 'share-social',\n Button.component({\n className: 'Button Button-icon Button--share',\n icon: 'fas fa-share-alt',\n onclick: () =>\n app.modal.show(\n ShareModal, {\n networks,\n discussion: this.discussion,\n }\n ),\n }, app.translator.trans('fof-share-social.forum.discussion.share_button')),\n -1\n );\n }\n });\n});\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack://@fof/share-social/webpack/bootstrap","webpack://@fof/share-social/external \"flarum.core.compat['components/Button']\"","webpack://@fof/share-social/external \"flarum.core.compat['utils/string']\"","webpack://@fof/share-social/external \"flarum.core.compat['extend']\"","webpack://@fof/share-social/external \"flarum.core.compat['components/DiscussionPage']\"","webpack://@fof/share-social/external \"flarum.core.compat['components/Modal']\"","webpack://@fof/share-social/./node_modules/pupa/index.js","webpack://@fof/share-social/./node_modules/escape-goat/index.js","webpack://@fof/share-social/./src/forum/components/ShareModal.js","webpack://@fof/share-social/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/share-social/./src/forum/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","htmlEscape","require","template","data","TypeError","doubleBraceRegex","test","replace","_","result","split","String","string","htmlUnescape","htmlString","htmlEscapeTag","strings","output","htmlUnescapeTag","shareUrls","facebook","twitter","linkedin","reddit","whatsapp","telegram","vkontakte","odnoklassniki","my_mail","qq","qzone","shareIcons","ShareModal","subClass","superClass","constructor","__proto__","oninit","vdom","this","networks","attrs","discussion","className","title","app","translator","trans","content","url","encodeURIComponent","forum","attribute","route","id","description","firstPost","truncate","getPlainContent","contentHtml","windowParams","$","window","height","width","map","network","Button","component","icon","onclick","open","pupa","Modal","initializers","add","extend","DiscussionPage","items","keys","filter","k","startsWith","Number","length","modal","show"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EA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,eAG7BG,IAAIC,WAAWC,MAAM,oDAExB","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['utils/string'];","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['components/DiscussionPage'];","module.exports = flarum.core.compat['components/Modal'];","'use strict';\nconst {htmlEscape} = require('escape-goat');\n\nmodule.exports = (template, data) => {\n\tif (typeof template !== 'string') {\n\t\tthrow new TypeError(`Expected a \\`string\\` in the first argument, got \\`${typeof template}\\``);\n\t}\n\n\tif (typeof data !== 'object') {\n\t\tthrow new TypeError(`Expected an \\`object\\` or \\`Array\\` in the second argument, got \\`${typeof data}\\``);\n\t}\n\n\tconst doubleBraceRegex = /{{(.*?)}}/g;\n\n\tif (doubleBraceRegex.test(template)) {\n\t\ttemplate = template.replace(doubleBraceRegex, (_, key) => {\n\t\t\tlet result = data;\n\n\t\t\tfor (const property of key.split('.')) {\n\t\t\t\tresult = result ? result[property] : '';\n\t\t\t}\n\n\t\t\treturn htmlEscape(String(result));\n\t\t});\n\t}\n\n\tconst braceRegex = /{(.*?)}/g;\n\n\treturn template.replace(braceRegex, (_, key) => {\n\t\tlet result = data;\n\n\t\tfor (const property of key.split('.')) {\n\t\t\tresult = result ? result[property] : '';\n\t\t}\n\n\t\treturn String(result);\n\t});\n};\n","'use strict';\n\nexports.htmlEscape = string => string\n\t.replace(/&/g, '&')\n\t.replace(/\"/g, '"')\n\t.replace(/'/g, ''')\n\t.replace(//g, '>');\n\nexports.htmlUnescape = htmlString => htmlString\n\t.replace(/>/g, '>')\n\t.replace(/</g, '<')\n\t.replace(/?39;/g, '\\'')\n\t.replace(/"/g, '\"')\n\t.replace(/&/g, '&');\n\nexports.htmlEscapeTag = (strings, ...values) => {\n\tlet output = strings[0];\n\tfor (let i = 0; i < values.length; i++) {\n\t\toutput = output + exports.htmlEscape(String(values[i])) + strings[i + 1];\n\t}\n\n\treturn output;\n};\n\nexports.htmlUnescapeTag = (strings, ...values) => {\n\tlet output = strings[0];\n\tfor (let i = 0; i < values.length; i++) {\n\t\toutput = output + exports.htmlUnescape(String(values[i])) + strings[i + 1];\n\t}\n\n\treturn output;\n};\n","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\nimport { truncate } from 'flarum/utils/string';\nimport { getPlainContent } from 'flarum/utils/string';\n\nimport pupa from 'pupa';\n\nconst shareUrls = {\n facebook: '//facebook.com/sharer/sharer.php?u={url}',\n twitter: '//twitter.com/share?url={url}&text={title}',\n linkedin: '//linkedin.com/shareArticle?mini=true&url={url}&title={title}&summary={description}',\n reddit: '//www.reddit.com/submit?url={url}&title={title}',\n whatsapp: '//wa.me/?text={title}%20{url}',\n telegram: '//telegram.me/share/url?url={url}&text={title}',\n\n vkontakte: '//vk.com/share.php?url={url}&title={title}&description={description}',\n odnoklassniki: '//connect.ok.ru/offer?url={url}',\n my_mail: '//connect.mail.ru/share?url={url}&title={title}&description={description}',\n qq: '//connect.qq.com/widget/shareqq/iframe_index.html?url={url}&title={title}',\n qzone: '//sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={url}&summary={description}&title={title}',\n};\n\nconst shareIcons = {\n vkontakte: 'fab fa-vk',\n my_mail: 'fas fa-at',\n qq: 'fab fa-qq',\n qzone: 'fas fa-star',\n};\n\nexport default class ShareModal extends Modal {\n oninit(vdom) {\n super.oninit(vdom);\n\n this.networks = this.attrs.networks;\n this.discussion = this.attrs.discussion;\n }\n\n className() {\n return 'FofShareSocialModal Modal--small';\n }\n\n title() {\n return app.translator.trans('fof-share-social.forum.modal.title');\n }\n\n content() {\n const url = encodeURIComponent(app.forum.attribute('baseUrl') + app.route('discussion', { id: this.discussion.id() }));\n const title = encodeURIComponent(app.title);\n const description = this.discussion.firstPost()\n ? encodeURIComponent(truncate(getPlainContent(this.discussion.firstPost().contentHtml()), 150, 0))\n : '';\n const data = { url, title, description };\n\n const width = 1000;\n const height = 500;\n const top = $(window).height() / 2 - height / 2;\n const left = $(window).width() / 2 - width / 2;\n const windowParams = `width=${width}, height= ${height}, top=${top}, left=${left}, status=no, scrollbars=no, resizable=no`;\n\n return (\n \n
\n
\n {this.networks.map(network =>\n Button.component(\n {\n className: `Button Button--rounded Button--block Share--${network}`,\n icon: `${shareIcons[network] || `fab fa-${network}`} fa-lg fa-fw`,\n onclick: () => window.open(pupa(shareUrls[network], data), app.title, windowParams),\n },\n app.translator.trans(`fof-share-social.lib.networks.${network}`)\n )\n )}\n
\n
\n
\n );\n }\n}\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import { extend } from 'flarum/extend';\nimport DiscussionPage from 'flarum/components/DiscussionPage';\nimport Button from 'flarum/components/Button';\n\nimport ShareModal from './components/ShareModal';\n\napp.initializers.add('fof/share-social', () => {\n extend(DiscussionPage.prototype, 'sidebarItems', function(items) {\n const prefix = 'fof-share-social.networks.';\n const networks = Object.keys(app.data)\n .filter(k => k.startsWith('fof-share-social.networks.') && Number(app.data[k]))\n .map(k => k.replace(prefix, ''));\n\n if (networks.length) {\n items.add(\n 'share-social',\n Button.component(\n {\n className: 'Button Button-icon Button--share',\n icon: 'fas fa-share-alt',\n onclick: () =>\n app.modal.show(ShareModal, {\n networks,\n discussion: this.discussion,\n }),\n },\n app.translator.trans('fof-share-social.forum.discussion.share_button')\n ),\n -1\n );\n }\n });\n});\n"],"sourceRoot":""}
\ No newline at end of file