UNPKG

@nextcloud/vue

Version:
1 lines 1.45 kB
{"version":3,"file":"Linkify.mjs","sources":["../../src/directives/Linkify/index.js"],"sourcesContent":["/**\n * @author Raimund Schlüßler\n * @copyright 2020 Raimund Schlüßler <raimund.schluessler@mailbox.org>\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU AFFERO GENERAL PUBLIC LICENSE for more details.\n *\n * You should have received a copy of the GNU Affero General Public\n * License along with this library. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport Linkify from '../../utils/Linkify.js'\n\n// Use function shorthand for same behavior on bind and update\n// https://vuejs.org/v2/guide/custom-directive.html#Function-Shorthand\nexport const directive = function(el, binding) {\n\tif (binding.value?.linkify === true) {\n\t\tel.innerHTML = Linkify(binding.value.text)\n\t}\n}\n\nexport default directive\n"],"names":["directive","el","binding","Linkify"],"mappings":";AAsBY,MAACA,IAAY,SAASC,GAAIC,GAAS;;AAC1CA,IAAAA,IAAAA,EAAQ,UAARA,gBAAAA,EAAe,aAAY,OAC9BD,EAAG,YAAYE,EAAQD,EAAQ,MAAM,IAAI;AAE3C;"}