Skip to content

Commit

Permalink
Current version as of 3/10/19
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinLeath committed Mar 11, 2019
1 parent be675e5 commit 0968f34
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 270 deletions.
20 changes: 20 additions & 0 deletions assets/js/externalopener.js
Expand Up @@ -59,3 +59,23 @@ document.getElementById("githubprofile_wh").addEventListener("auxclick", functio
var remoteLink = this.getAttribute('href');
shell.openExternal( remoteLink );
});
document.getElementById("austinleath.comclick").addEventListener("click", function (e) {
e.preventDefault();
var remoteLink = this.getAttribute('href');
shell.openExternal( remoteLink );
});
document.getElementById("austinleath.comclick").addEventListener("auxclick", function (e) {
e.preventDefault();
var remoteLink = this.getAttribute('href');
shell.openExternal( remoteLink );
});
document.getElementById("discordbot").addEventListener("click", function (e) {
e.preventDefault();
var remoteLink = this.getAttribute('href');
shell.openExternal( remoteLink );
});
document.getElementById("discordbot").addEventListener("auxclick", function (e) {
e.preventDefault();
var remoteLink = this.getAttribute('href');
shell.openExternal( remoteLink );
});
24 changes: 4 additions & 20 deletions index.html
Expand Up @@ -341,8 +341,8 @@ <h1 style="text-align: center;">Rainbow Six Siege | Rank Calculator (Custom Rank
</div>
</form>
<div class="versionnum">
<!-- the button onClick sends a quitAndInstall message to the electron main process -->
<!-- <a>Subscribe to the R6RC newsletter! | <a id="mailchimp" class="icon alt fa-envelope" href="http://eepurl.com/dDs2rb"></a></a><br> -->
Created with care for the community by: <a id="austinleath.comclick" href="https://www.austinleath.com">Austin Leath</a><br>
<a>Node.js: <script>document.write(process.versions.node)</script></a> |
<a>Chromium: <script>document.write(process.versions.chrome)</script></a> |
<a>Electron: <script>document.write(process.versions.electron)</script></a> |
Expand Down Expand Up @@ -370,9 +370,10 @@ <h1>VERSION 0.4.4 CHANGE NOTES</h1>
<strong>CHANGES</strong>
<li><b>Added</b> a hotkeys page</li>
<li><b>Added</b> the "TOP PLAYERS" option (5000 MMR or above) to the list of presets</li>
<li><b>Created</b> the R6RC Discord bot (join the discord to use it)</li>
<li><b>Improved</b> the dropdown for the preset solving method</li>
<li><b>Created</b> the R6RC Discord bot (join the Discord or <a id="discordbot" href="https://discordapp.com/api/oauth2/authorize?client_id=434432973362954241&permissions=8&scope=bot">click here</a>)</li>
<li><b>Improved</b> the dropdown for the list of preset values</li>
<li><b>Improved</b> R6RC startup time</li>
<li><b>Updated</b> crucial dependencies to the latest version</li>
</ul>
<ul>
<strong>COMING SOON</strong>
Expand Down Expand Up @@ -460,22 +461,5 @@ <h1>There are no other cool keys to press! <a href="mailto:austinleath18@gmail.c
<script src="assets/react/react.js"></script>
<script src="assets/react/react-dom.js"></script>
<script src="assets/react/timeran.js"></script>
<script>
function showHint(str) {
if (str.length == 0) {
document.getElementById("txtHint").innerHTML = "";
return;
} else {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("txtHint").innerHTML = this.responseText;
}
};
xmlhttp.open("GET", "https://www.r6rc.com/assets/php/gethint.php?q=" + str, true);
xmlhttp.send();
}
}
</script>
</body>
</html>
22 changes: 11 additions & 11 deletions main.js
Expand Up @@ -3,19 +3,16 @@ var visitor = ua('UA-111374271-3');
visitor.pageview("index.html").send();

const {app, BrowserWindow, Menu, protocol, ipcMain, shell} = require('electron');
const log = require('electron-log');
const {autoUpdater} = require("electron-updater");
const name = app.getName();
const version = app.getVersion();
autoUpdater.logger = log;
autoUpdater.logger.transports.file.level = 'info';

log.info('App initialized on platform: ' + process.platform);
console.log('App initialized on platform: ' + process.platform);

let win;

function sendStatusToWindow(text) {
log.info(text);
console.log(text);
win.webContents.send('message', text);
}
function createDefaultWindow() {
Expand Down Expand Up @@ -97,24 +94,24 @@ app.setJumpList([

let template = []
// Windows Menu
log.info('Menu loaded for ' + name + ' on platform: ' + process.platform);
console.log('Menu loaded for ' + name + ' on platform: ' + process.platform);
template.unshift({
label: name,
submenu: [
{
label: 'Join the Discord',
accelerator: 'Shift+Control+D',
click() { require('electron').shell.openExternal('https://discord.gg/NaAmbbb'); }
click() { console.log('Shift+Control+D has been pressed'); require('electron').shell.openExternal('https://discord.gg/NaAmbbb'); }
},
{
label: 'Learn More',
accelerator: 'Control+L',
click() { require('electron').shell.openExternal('https://www.github.com/austinleath/r6rc'); }
click() { console.log('Control+L has been pressed'); require('electron').shell.openExternal('https://www.github.com/austinleath/r6rc'); }
},
{
label: 'Donate',
accelerator: 'Control+D',
click() { require('electron').shell.openExternal('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3NS3ZERCW9GD8'); }
click() { console.log('Control+D has been pressed'); require('electron').shell.openExternal('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3NS3ZERCW9GD8'); }
},
{
label: 'Fullscreen',
Expand All @@ -124,12 +121,12 @@ let template = []
{
label: 'Minimize',
accelerator: 'Control+M',
click() { win.minimize();}
click() { console.log('Control+M has been pressed'); win.minimize();}
},
{
label: 'Quit',
accelerator: 'Control+Q',
click() { win.close(); }
click() { console.log('Control+Q has been pressed'); win.close(); }
}
]
})
Expand All @@ -138,8 +135,10 @@ function fullScreenModule() {

if ( win.isFullScreen(true) ) {
win.setFullScreen(false);
console.log('Application exited fullscreen');
} else {
win.setFullScreen(true);
console.log('Application entered fullscreen');
}
}

Expand Down Expand Up @@ -179,4 +178,5 @@ if (!gotTheLock) {
}
app.on('window-all-closed', () => {
app.quit();
console.log('Application has been closed successfully');
});

0 comments on commit 0968f34

Please sign in to comment.