mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 23:53:13 +09:00
Cleaned up remoteMap drawing code using ES6 modules
This commit is contained in:
1 parent
ced0aa4522
commit
322a1711ab
4 files changed
+72
-141
No files matched your search
@@ -0,0 +1,9 @@
|
||||
export function getParameterByName(name, url) {
|
||||
if(!url) url = window.location.href;
|
||||
name = name.replace(/[\[\]]/g, "\\$&");
|
||||
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
|
||||
results = regex.exec(url);
|
||||
if(!results) return null;
|
||||
if(!results[2]) return '';
|
||||
return decodeURIComponent(results[2].replace(/\+/g, " "));
|
||||
}
|
||||
Reference in new issue
Block a user