Files
factorio-clusterio/packages/master/web/basename.jsx
T
Hornwitser 03b7d22ba6 Use consistent semi-colon placment
Add semicolons to web interface code to be consistent with project
standard.
2020-09-28 05:52:29 +02:00

7 lines
268 B
React

// Calculate basedir of application based on current location and
// the provided web_root from master server.
const location = new URL(window.web_root, document.location);
const basename = location.pathname !== "/" ? location.pathname : "";
export default basename;