| Current Path : /home/musicpassiondjs40/djandreidis/media/plg_system_nrframework/js/ |
| Current File : /home/musicpassiondjs40/djandreidis/media/plg_system_nrframework/js/helper.js |
!function(e,i){"use strict";var t={serializeform:function(e){var t,n,o=[];if("object"==typeof e&&"FORM"==e.nodeName)for(var l=e.elements.length,i=0;i<l;i++)if((t=e.elements[i]).name&&!t.disabled&&"button"!=t.type&&"file"!=t.type&&"hidden"!=t.type&&"reset"!=t.type&&"submit"!=t.type)if("select-multiple"==t.type){n=e.elements[i].options.length;for(var r=0;r<n;r++)t.options[r].selected&&(o[o.length]=encodeURIComponent(t.name)+"="+encodeURIComponent(t.options[r].value))}else("checkbox"!=t.type&&"radio"!=t.type||t.checked)&&(o[o.length]=encodeURIComponent(t.name)+"="+encodeURIComponent(t.value));return o.join("&").replace(/%20/g,"+")},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},loadScript:function(e,t,n,o){var l;if(void 0===n&&(n=!1),void 0===o&&(o=null),0<(l=(o=null===o?i:o).querySelectorAll('script[src="'+e+'"]')).length){if(!n)return void("function"==typeof t&&t());l.forEach(function(e){e.remove()})}(l=i.createElement("script")).src=e,o.head.appendChild(l),"function"==typeof t&&(l.onload=function(){t()})},loadStyleSheet:function(e,t,n){if(void 0===n&&(n=null),0<(n=null===n?i:n).querySelectorAll('link[href="'+e+'"]').length)"function"==typeof t&&t();else{var o=i.createElement("link");o.href=e,o.type="text/css",o.rel="stylesheet",n.getElementsByTagName("head")[0].prepend(o)}}};e.NRHelper=t}(window,document);