You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Plugins/dataRender/anchor.min.mjs

2 lines
531 B
JavaScript

/*! © Fedonyuk Anton - datatables.net/license */
import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;DataTable.render.anchor=function(e=0,n={},f=null){return function(r,e,t,a={}){if("display"!==e)return r;null===f&&(f=r);var l="function"==typeof n?n(r,t,a):n;if(!l.href)switch(e){case"mail":l.href="mailto:"+r;break;case"phone":l.href="tel:"+r.replace(/[^+\d]+/g,"");break;default:try{l.href=new URL(r)}catch(e){l.href=r}}return jQuery("<a/>").attr(l).text(f||"")[0].outerText}};export default DataTable;