-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
5,480 additions
and
137 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
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,19 +1,28 @@ | ||
|
||
const { remote, ipcRenderer } = require('electron'); | ||
const shell = require('electron').shell; | ||
const remote = require('electron').remote; | ||
const app = require('electron').remote.app; | ||
const ipcRenderer = require('electron').ipcRenderer; | ||
|
||
|
||
function runscript(x) { | ||
var open_weather = document.getElementById('open-weather'); | ||
open_weather.addEventListener('click', () => { | ||
shell.openExternal('https://openweathermap.org/city'); | ||
}); | ||
var fork_me = document.getElementById('fork-me'); | ||
fork_me.addEventListener('click', () => { | ||
shell.openExternal('http://github.com/deep5050/minimal-weather'); | ||
}); | ||
// const ipcRenderer = require('electron').ipcRenderer; | ||
const BrowserWindow = require('electron').remote.BrowserWindow; | ||
const path = require('path'); | ||
const url = require('url'); | ||
var submit; | ||
var city_name; | ||
|
||
function runscript() { | ||
submit = document.getElementById("submit"); | ||
var city_id = document.getElementById("city_code"); | ||
city_name = document.getElementById("city_name"); | ||
|
||
submit.addEventListener('click', () => { | ||
|
||
let mainWindow = remote.getGlobal ('mainWindow'); | ||
var city_val = city_name.value; | ||
if (mainWindow) { | ||
mainWindow.webContents.send('city_name', 'city_val'); | ||
console.log('sent'); | ||
} | ||
console.log(city_val); | ||
}) | ||
|
||
} |
File renamed without changes
Binary file not shown.
Oops, something went wrong.