MCPcopy Create free account
hub / github.com/Semporia/Scripts / getUrlQueryParams

Function getUrlQueryParams

jd_factory_component.js:388–395  ·  view source on GitHub ↗
(url_string, param)

Source from the content-addressed store, hash-verified

386}
387
388function getUrlQueryParams(url_string, param) {
389 let reg = new RegExp("(^|&)" + param + "=([^&]*)(&|$)", "i");
390 let r = url_string.split('?')[1].substr(0).match(reg);
391 if (r != null) {
392 return decodeURIComponent(r[2]);
393 };
394 return '';
395}
396
397function format(a, time) {
398 if (!a) a = 'yyyy-MM-dd';

Callers 1

decryptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected