1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| (function($) {
$.getUrlParam = function(name) { let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); let r = window.location.search.substr(1).match(reg); if(r != null) return decodeURI(r[2]); return null; }
$.sleep = function (time) { return new Promise((resolve) => setTimeout(resolve, time)); } })(jQuery);
|