mirror of
https://github.com/liriliri/eruda.git
synced 2026-03-20 09:38:37 +08:00
Dev: Monitor fetch #24
This commit is contained in:
12
eustia/fullUrl.js
Normal file
12
eustia/fullUrl.js
Normal file
@@ -0,0 +1,12 @@
|
||||
_('startWith');
|
||||
|
||||
let origin = window.location.origin;
|
||||
|
||||
function exports(url)
|
||||
{
|
||||
if (startWith(url, 'http')) return url;
|
||||
|
||||
if (!startWith(url, '/')) url = '/' + url;
|
||||
|
||||
return origin + url;
|
||||
}
|
||||
Reference in New Issue
Block a user