mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 23:24:52 +09:00
Split up codebase into the packages @clsterio/lib, @clusterio/master, @clusterio/slave, and @clusterio/ctl using lerna to manage them. This will allow deployment to use only the parts needed reducing install size, and better separate the code into shared library, master, slave and control.
10 lines
359 B
JavaScript
10 lines
359 B
JavaScript
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, " "));
|
|
}
|