Skip to content

Commit

Permalink
Adds flash support
Browse files Browse the repository at this point in the history
  • Loading branch information
coltnz authored and kamranahmedse committed Jun 14, 2019
1 parent aa1d827 commit 5a64588
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@ const argv = require('yargs').parse(process.argv.slice(1));

const http = require('http');
const url = require('url');
const fs = require('fs');
const os = require('os');

const { setMainMenu } = require('./menu');

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;

// Add flash support. If $USER_HOME/.pennywise-flash exists as plugin directory or symlink uses that.
const flashPath = path.join(os.homedir(), ".pennywise-flash");
if (flashPath && fs.existsSync(flashPath)) {
try{
app.commandLine.appendSwitch('ppapi-flash-path', fs.realpathSync(flashPath));
console.log("Attempting to load flash at " + flashPath)
}catch (e){
console.log("Error finding flash at " + flashPath + ": " + e.message);
}
}

function createWindow() {
mainWindow = new BrowserWindow({
title: 'Pennywise',
Expand Down
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ If you are on MacOS, you can use [Homebrew](https://brew.sh/) to install it
```
brew cask install pennywise
```
To enable flash support, copy Chrome's Pepperflash plugin into your $USER-DIR/.pennywise-flash. Or better yet create a symlink to the plugin installed with your browser. See chrome://flash in your browser for installation path.

e.g. on MacOS

```
ln -s "/Users/colint/Library/Application Support/Google/Chrome/PepperFlash/32.0.0.156/PepperFlashPlayer.plugin" .pennywise-flash
```
Using flash is at your own risk and should only be done with sites you trust!

## Usecases

Expand Down

0 comments on commit 5a64588

Please sign in to comment.