Commit a7e7d9f7 authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent 75704251
...@@ -200,34 +200,35 @@ function start_server() { ...@@ -200,34 +200,35 @@ function start_server() {
save_db(); save_db();
}); });
autoUpdater.setFeedURL('https://mycard.moe/update/' + {win32: 'win'}[process.platform] + { if (process.platform == 'win32') {
ia32: '32', autoUpdater.setFeedURL('https://mycard.moe/update/' + {win32: 'win'}[process.platform] + {
x64: '64' ia32: '32',
}[process.arch]); x64: '64'
if (process.argv[1] == '--squirrel-firstrun') { }[process.arch]);
setTimeout(()=> { if (process.argv[1] == '--squirrel-firstrun') {
setTimeout(()=> {
autoUpdater.checkForUpdates();
}, 3000)
} else {
autoUpdater.checkForUpdates(); autoUpdater.checkForUpdates();
}, 3000) }
} else {
autoUpdater.checkForUpdates();
}
/*autoUpdater.on('error', (error)=>{
console.log('update error', error)
});
autoUpdater.on('checking-for-update', ()=>{
console.log('checking-for-update')
});
autoUpdater.on('update-available', ()=>{
console.log('update-available')
});
autoUpdater.on('update-not-available', ()=>{
console.log('update-not-available')
});*/
autoUpdater.on('update-downloaded', ()=> {
autoUpdater.quitAndInstall()
})
/*autoUpdater.on('error', (error)=>{
console.log('update error', error)
});
autoUpdater.on('checking-for-update', ()=>{
console.log('checking-for-update')
});
autoUpdater.on('update-available', ()=>{
console.log('update-available')
});
autoUpdater.on('update-not-available', ()=>{
console.log('update-not-available')
});*/
autoUpdater.on('update-downloaded', ()=> {
autoUpdater.quitAndInstall()
})
}
} }
function load(app, local, callback) { function load(app, local, callback) {
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<webview id="store" src="http://mycard.moe/"></webview> <webview id="store" src="http://mycard.moe/"></webview>
<webview id="ygopro" src="http://mycard.moe/lobby/"></webview> <webview id="ygopro" src="http://mycard.moe/lobby/"></webview>
<!-- fuck https https://plus.google.com/u/0/+%E7%A5%9E%E6%A5%BD%E5%9D%82%E7%8E%B2%E5%A5%88/posts/79g2y5JRB1Z --> <!-- fuck https https://plus.google.com/u/0/+%E7%A5%9E%E6%A5%BD%E5%9D%82%E7%8E%B2%E5%A5%88/posts/79g2y5JRB1Z -->
<webview id="forum" src="https://forum.touhou.cc"></webview> <webview id="forum" src="https://ygobbs.com"></webview>
<script src="js/app.js"></script> <script src="js/app.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -47,8 +47,8 @@ for (let i = 0; i < webviews.length; i++) { ...@@ -47,8 +47,8 @@ for (let i = 0; i < webviews.length; i++) {
}); });
/*webviews.item(i).addEventListener('will-navigate', (event) => { /*webviews.item(i).addEventListener('will-navigate', (event) => {
event.preventDefault() event.preventDefault()
});*/ });*/
} }
document.getElementById("logout").onclick = ()=> { document.getElementById("logout").onclick = ()=> {
...@@ -66,7 +66,7 @@ let elements = document.getElementsByClassName('profile'); ...@@ -66,7 +66,7 @@ let elements = document.getElementsByClassName('profile');
for (let i = 0; i < elements.length; i++) { for (let i = 0; i < elements.length; i++) {
let element = elements.item(i); let element = elements.item(i);
element.onclick = function () { element.onclick = function () {
let user_url = 'https://forum.touhou.cc/users/' + document.getElementById('username').innerHTML; let user_url = 'https://ygobbs.com/users/' + document.getElementById('username').innerHTML;
let user_webview = document.getElementById('forum'); let user_webview = document.getElementById('forum');
if (user_webview.src.indexOf(user_url) != 0) { // begin with if (user_webview.src.indexOf(user_url) != 0) { // begin with
user_webview.src = user_url; user_webview.src = user_url;
......
...@@ -131,14 +131,14 @@ app.on('ready', function () { ...@@ -131,14 +131,14 @@ app.on('ready', function () {
mainWindow.webContents.on('dom-ready', ()=> { mainWindow.webContents.on('dom-ready', ()=> {
if (local) { if (local) {
mainWindow.webContents.executeJavaScript(` mainWindow.webContents.executeJavaScript(`
let webview = document.getElementById('ygopro'); var webview = document.getElementById('ygopro');
webview.src = 'http://local.mycard.moe:3000/' webview.src = 'http://local.mycard.moe:3000/'
`) `)
} }
if (dev) { if (dev) {
mainWindow.webContents.openDevTools(); mainWindow.webContents.openDevTools();
mainWindow.webContents.executeJavaScript(` mainWindow.webContents.executeJavaScript(`
let webview = document.getElementById('ygopro'); var webview = document.getElementById('ygopro');
webview.addEventListener("dom-ready", function() { webview.addEventListener("dom-ready", function() {
webview.openDevTools(); webview.openDevTools();
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment