Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Electron 17 compatibility #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Original versions of WhatsApp Desktop was written by:

## Download WhatsApp

* Windows 10 - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.2/WhatsApp-win32-x64.zip) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/WhatsApp-win32-x64.zip?style=flat-square)
* Mac OSX - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.2/WhatsApp-darwin-x64.zip) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/WhatsApp-darwin-x64.zip?style=flat-square)
* Ubuntu (32 bits) - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.2/whatsapp-desktop-x32.deb) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/whatsapp-desktop-x32.deb?style=flat-square)
* Ubuntu (64 bits) - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.2/whatsapp-desktop-x64.deb) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/whatsapp-desktop-x64.deb?style=flat-square)
* Windows 10 - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.3/WhatsApp-win32-x64.zip) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/WhatsApp-win32-x64.zip?style=flat-square)
* Mac OSX - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.3/WhatsApp-darwin-x64.zip) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/WhatsApp-darwin-x64.zip?style=flat-square)
* Ubuntu (32 bits) - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.3/whatsapp-desktop-x32.deb) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/whatsapp-desktop-x32.deb?style=flat-square)
* Ubuntu (64 bits) - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.3/whatsapp-desktop-x64.deb) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/whatsapp-desktop-x64.deb?style=flat-square)

Donations
-----
Expand Down
2 changes: 1 addition & 1 deletion app/html/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<script type="text/javascript">
window.jQuery = window.$ = require('../js/lib/jquery.min.js');
window.Hammer = require('../js/lib/hammer.min.js');
window.app = require('electron').remote;
window.app = require('@electron/remote');
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.0/css/materialize.min.css">
<link rel="stylesheet" href="../css/settings.css">
Expand Down
2 changes: 1 addition & 1 deletion app/html/phoneinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<script type="text/javascript">
window.jQuery = window.$ = require('../js/lib/jquery.min.js');
window.Hammer = require('../js/lib/hammer.min.js');
window.app = require('electron').remote;
window.app = require('@electron/remote');
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.0/css/materialize.min.css">
<link rel="stylesheet" href="../css/settings.css">
Expand Down
2 changes: 1 addition & 1 deletion app/html/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<script type="text/javascript">
window.jQuery = window.$ = require('../js/lib/jquery.min.js');
window.Hammer = require('../js/lib/hammer.min.js');
window.app = require('electron').remote;
window.app = require('@electron/remote');
_ = window.app.getGlobal("_");
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.0/css/materialize.min.css">
Expand Down
4 changes: 2 additions & 2 deletions app/js/views/about.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var whatsApp = require('electron').remote.getGlobal("whatsApp");
var pjson = require('electron').remote.getGlobal('pjson');
var whatsApp = require('@electron/remote').getGlobal("whatsApp");
var pjson = require('@electron/remote').getGlobal('pjson');

$(document).ready(() => {
$("#appversion").html(pjson["version"]);
Expand Down
4 changes: 2 additions & 2 deletions app/js/views/phoneinfo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var whatsApp = require('electron').remote.getGlobal("whatsApp");
var phoneinfo = require('electron').remote.getGlobal('phoneinfo');
var whatsApp = require('@electron/remote').getGlobal("whatsApp");
var phoneinfo = require('@electron/remote').getGlobal('phoneinfo');

var PhoneInfoView = {
bindEvents() {
Expand Down
8 changes: 4 additions & 4 deletions app/js/views/settings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var whatsApp = require('electron').remote.getGlobal("whatsApp");
var settings = require('electron').remote.getGlobal('settings');
var config = require('electron').remote.getGlobal('config');
const {dialog} = require('electron').remote;
var whatsApp = require('@electron/remote').getGlobal("whatsApp");
var settings = require('@electron/remote').getGlobal('settings');
var config = require('@electron/remote').getGlobal('config');
const {dialog} = require('@electron/remote');

var SettingsView = {
bindEvents() {
Expand Down
9 changes: 8 additions & 1 deletion app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
}
})

// Needed for @electron/remote to work.
app.on('browser-window-created', (_, window) => {
require("@electron/remote/main").enable(window.webContents)
})

if (!isAlreadyLocked) {
app.quit()
}
Expand Down Expand Up @@ -789,7 +794,9 @@
"center": true,
"frame": true,
"webPreferences": {
"nodeIntegration": true,
"nodeIntegration": true,
"contextIsolation": false,
"enableRemoteModule": true,
}
}
)
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "whatsapp-desktop",
"version": "0.5.2",
"version": "0.5.3",
"license": "GPL-3.0",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion build/templates/debian-x32/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: whatsapp-desktop
Version: 0.5.2
Version: 0.5.3
Section: net
Priority: optional
Maintainer: Tierry Danquin <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion build/templates/debian-x64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: whatsapp-desktop
Version: 0.5.2
Version: 0.5.3
Section: net
Priority: optional
Maintainer: Tierry Danquin <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "whatsapp-desktop",
"version": "0.5.2",
"version": "0.5.3",
"repository": "https://github.com/oOthkOo/whatsapp-desktop.git",
"description": "Unofficial WhatsApp Desktop Client for OSX, Linux and Windows. Build with Electron.",
"main": "main.js",
Expand Down