Cleanup network provider (#3)

This commit is contained in:
Justin Starry
2020-03-16 15:17:51 +08:00
committed by Michael Vines
parent d7b2612915
commit de1df895a0
3 changed files with 37 additions and 48 deletions

12
explorer/src/utils.ts Normal file
View File

@@ -0,0 +1,12 @@
export function findGetParameter(parameterName: string): string | null {
let result = null,
tmp = [];
window.location.search
.substr(1)
.split("&")
.forEach(function(item) {
tmp = item.split("=");
if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
});
return result;
}