-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:lexogrine/csgo-react-hud
- Loading branch information
Showing
9 changed files
with
129 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
PORT=3500 | ||
GENERATE_SOURCEMAP=false | ||
GENERATE_SOURCEMAP=false | ||
BROWSER=none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const path = require('path'); | ||
const fs = require('fs'); | ||
const pathToConfig = path.join(process.env.APPDATA, 'hud-manager','databases', 'config'); | ||
let query = ''; | ||
if(fs.existsSync(pathToConfig)){ | ||
try { | ||
const config = JSON.parse(fs.readFileSync(pathToConfig, 'utf-8')); | ||
if(config.port) { | ||
query = `?port=${config.port}` | ||
console.log('LHM Port detected as', config.port); | ||
} else { | ||
console.log('LHM Port unavailable'); | ||
} | ||
} catch { | ||
console.log('LHM Config file invalid'); | ||
} | ||
} else { | ||
console.log('LHM Config file unavailable'); | ||
} | ||
|
||
module.exports = { | ||
devServer: { | ||
port: 3500, | ||
open: true, | ||
host: 'localhost', | ||
openPage: query | ||
}, | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const regex = /^\s*(?:<\?xml[^>]*>\s*)?(?:<!doctype svg[^>]*\s*(?:\[?(?:\s*<![^>]*>\s*)*\]?)*[^>]*>\s*)?(?:<svg[^>]*>[^]*<\/svg>|<svg[^/>]*\/\s*>)\s*$/i; | ||
|
||
const isSvg = (img: Buffer) => | ||
regex.test( | ||
img | ||
.toString() | ||
.replace(/\s*<!Entity\s+\S*\s*(?:"|')[^"]+(?:"|')\s*>/gim, '') | ||
.replace(/<!--([\s\S]*?)-->/g, '') | ||
); | ||
|
||
export default isSvg; |