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/hyperLink.min.mjs

2 lines
728 B
JavaScript

/*! © Lokesh Babu - datatables.net/license */
import DataTable from"datatables.net";DataTable.render.hyperLink=function(n,i,l,o){function e(e,t){return"number"==typeof e||"string"==typeof e&&parseInt(e)?e:t}n=n||"Click Here",i=i||"newTab",l=e(l,600),o=e(o,400);return function(e,t,r){if("display"!==t)return e;var a=e;try{switch(a=new URL(e),i){case"newTab":return'<a title="'+a+'" href="'+a+'" target="_blank">'+n+"</a>";case"popup":return'<a title="'+a+'" href="'+a+'" target="popup" rel="noopener noreferrer" onclick="window.open(\''+a+"', '"+n+"', 'width="+l+",height="+o+"'); return false;\">"+n+"</a>";default:return'<a title="'+a+'" href="'+a+'" target="_blank">'+n+"</a>"}}catch(e){return a}}};export default DataTable;