generated from cis3296f22/project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from cis3296f23/bigham-dev
PoC, configuration for .env and .gitignore
- Loading branch information
Showing
9 changed files
with
2,210 additions
and
1 deletion.
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 +1,2 @@ | ||
node_modules/ | ||
node_modules/ | ||
.env |
Empty file.
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,3 @@ | ||
var root = document.getElementById("root"); | ||
var summonerInfo = getSummoner({}); | ||
root.appendChild(summonerInfo); |
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,20 @@ | ||
const { Kayn, REGIONS } = require("kayn"); | ||
require("dotenv").config(); | ||
|
||
function getSummoner({ summonerName = "GreenHam09" }) { | ||
var div = document.createElement("div"); | ||
div.classList.add("summoner"); | ||
var summonerNameHeader = document.createElement("h2"); | ||
summonerNameHeader.innerHTML = summonerName; | ||
div.appendChild(summonerNameHeader); | ||
|
||
var kayn = Kayn(process.env.API_KEY)(); | ||
kayn.Summoner.by.name(summonerName).callback(function (err, summoner) { | ||
var level = document.createElement("p"); | ||
level.innerHTML = summoner.summonerLevel; | ||
div.appendChild(level); | ||
console.log(summoner); | ||
}); | ||
|
||
return div; | ||
} |
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,38 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> | ||
|
||
<!-- | ||
<meta | ||
http-equiv="Content-Security-Policy" | ||
content="default-src 'self'; script-src 'self' https://unpkg.com" | ||
/> | ||
<meta | ||
http-equiv="X-Content-Security-Policy" | ||
content="default-src 'self'; script-src 'self' https://unpkg.com" | ||
/> | ||
--> | ||
|
||
<script src="getSummoner.js"></script> | ||
<!-- React dependencies via CDNs --> | ||
<script src="https://unpkg.com/[email protected]/umd/react.production.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script> | ||
|
||
<!-- Babel for JSX compilation --> | ||
<script src="https://unpkg.com/[email protected]/babel.min.js"></script> | ||
|
||
<!-- Styling--> | ||
<link rel="stylesheet" type="text/css" href="summoner.css" /> | ||
|
||
<title>OpenOverlay</title> | ||
</head> | ||
<body> | ||
<div id="root"> | ||
<p>Summoner Name</p> | ||
<script src="OpenOverlay.js"></script> | ||
</div> | ||
</body> | ||
</html> |
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,22 @@ | ||
const { app, BrowserWindow } = require("electron"); | ||
|
||
const createWindow = () => { | ||
const win = new BrowserWindow({ | ||
webPreferences: { | ||
nodeIntegration: true, | ||
contextIsolation: false, | ||
}, | ||
width: 1600, | ||
height: 1200, | ||
}); | ||
|
||
win.loadFile("index.html"); | ||
}; | ||
|
||
app.whenReady().then(() => { | ||
createWindow(); | ||
}); | ||
|
||
app.on("window-all-closed", () => { | ||
if (process.platform !== "darwin") app.quit(); | ||
}); |
Oops, something went wrong.