Skip to content
This repository has been archived by the owner on Sep 17, 2020. It is now read-only.

Commit

Permalink
updates for 1.7.0 release:
Browse files Browse the repository at this point in the history
- update to electron 6, using latest electron-builder
- update to latest webrecorder
- add new preload.js
- add flag to allow autoplay
- bump version to 1.7.0
  • Loading branch information
ikreymer committed Jul 31, 2019
1 parent dfdbe59 commit a630525
Show file tree
Hide file tree
Showing 7 changed files with 626 additions and 347 deletions.
3 changes: 2 additions & 1 deletion app/main.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ app.commandLine.appendSwitch(
'ppapi-flash-path',
path.join(projectDir, pluginDir, pluginName)
);
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required');

const findPort = function (rawBuff, source) {
const buff = rawBuff.toString();
Expand Down Expand Up @@ -99,7 +100,7 @@ const findPort = function (rawBuff, source) {
);
Object.assign(wrConfig, { host: appUrl });

const sesh = session.fromPartition('persist:wr', { cache: true });
const sesh = session.fromPartition('persist:local-replay', { cache: true });
const proxy = `localhost:${port}`;
sesh.setProxy({ proxyRules: proxy }, () => {
mainWindow.webContents.send('indexing', { host: appUrl, source });
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "webrecorder-player",
"productName": "Webrecorder Player",
"version": "1.6.5",
"version": "1.7.0",
"description": "Webrecorder Player -- Standalone Web Archive Browser App",
"main": "./main.prod.js",
"scripts": {
Expand Down
39 changes: 39 additions & 0 deletions app/preload.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const { ipcRenderer } = require('electron');

const wr_msg_handler = '___$wr_msg_handler___$$';

class IPCHandler {
constructor() {
this.on_message = null;

ipcRenderer.on('wr-message', (event) => {
if (this.on_message) {
this.on_message(event.data);
}
});
}

send(msg) {
ipcRenderer.sendToHost('wr-message', msg);
}
}

window[wr_msg_handler] = new IPCHandler();


document.addEventListener('drop', (evt) => {
evt.preventDefault();

const filename = evt.dataTransfer.files[0].path;
const state = {
wb_type: 'open',
filename
};

ipcRenderer.sendToHost('open', state);
});

document.addEventListener('dragover', (evt) => {
evt.preventDefault();
evt.stopPropagation();
});
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "webrecorderplayer",
"productName": "Webrecorder Player",
"version": "1.6.5",
"version": "1.7.0",
"description": "Webrecorder Player -- Standalone Web Archive Browser App",
"scripts": {
"build": "concurrently \"npm run build-main\" \"npm run build-frontend\"",
Expand Down Expand Up @@ -106,8 +106,8 @@
"concurrently": "^4.1.0",
"cross-env": "^5.2.0",
"dat-node": "^3.5.13",
"electron": "5.0.7",
"electron-builder": "^20.38.1",
"electron": "6.0.0",
"electron-builder": "21.2.0",
"electron-debug": "^2.0.0",
"electron-devtools-installer": "^2.2.4",
"electron-publisher-s3": "^20.17.2",
Expand Down
42 changes: 0 additions & 42 deletions preload.js

This file was deleted.

2 changes: 1 addition & 1 deletion webrecorder
Loading

0 comments on commit a630525

Please sign in to comment.