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
491 B
JavaScript

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