-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathws.min.js.map
1 lines (1 loc) · 4.85 KB
/
ws.min.js.map
1
{"version":3,"sources":["webpack:///webpack/bootstrap c936288d361bc83b529a","webpack:///./ws.js"],"names":[],"mappings":"YACA,cAMA,IACA,iBAGA,mBACA,CACA,IACA,KAIA,2CAGA,aAGA,OACA,OAIA,IAzBA,eA4BA,MAGA,uBACA,GACA,kCACA,CACA,gBACA,cAGA,OAGA,iBACA,YACA,qBAA2B,UAA0B,UACrD,YAAiC,CAAe,QAChD,EAEA,aADA,QAIA,mBAAsD,wCAA+D,SAGrH,MAGA,yBC9CA,aAEA,eACA,MAKA,oBAJA,wCAKA,cAEA,ihBACA,2BACA,6BAGA,wCACA,iCACA,SACA,2BACA,oCACA,0BACA,iBAEA,WAEA,cACA,4BACA,yCAAwE,6BACxE,IAAa,SACb,CAEA,oBADA,QAGA,GACA,iDACA,uBACA,qBACA,OACA,KACA,cAEA,IACA,eAAC","file":"ws.min.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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c936288d361bc83b529a","/**\n * **************************************************\n * ******************* Web Share ********************\n * **************************************************\n *\n * Usage ::\n *\n * __web_share__.attach({\n * target: '.className' or '#id' or any valid selector for querySelector\n * style: {\n * position: absolute,\n * color: red\n * }\n * });\n */\n(function (root) {\n // If share api is not available\n if (!navigator.share) {\n console.warn('Web Share API is not available');\n return false;\n }\n \n\n let __web_share__ = {};\n const svg = `<svg fill=\"#000000\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z\"/></svg>`;\n \n __web_share__.attach = options => {\n if (typeof options === 'undefined' || typeof options.target === 'undefined'){\n return;\n }\n\n const container = document.querySelector(options.target);\n const host = document.createElement('p');\n const cb = options.cb;\n let url = document.location.href;\n const canonicalElement = document.querySelector('link[rel=canonical]');\n if (canonicalElement !== undefined) {\n url = canonicalElement.href;\n }\n host.id = '__ws__share';\n\n if (typeof options.style === 'object'){\n try{\n host.style = JSON.stringify(options.style).replace(/({|}|\\\")/g, '').replace(/,/g, ';');\n }catch(e){\n console.error(e);\n return;\n }\n }\n host.innerHTML = svg;\n host.addEventListener('click', function () {\n if(typeof cb === 'function') cb();\n navigator.share({url: url});\n });\n container.appendChild(host);\n }\n\n root.__web_share__ = __web_share__;\n}(window));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./ws.js\n// module id = 0\n// module chunks = 0"],"sourceRoot":""}