Skip to content

Instantly share code, notes, and snippets.

@rafpro
Forked from kentcdodds/.gitignore
Created January 26, 2021 14:15
Show Gist options
  • Save rafpro/bca56226fa30d8ad8de2a71decf8b1a7 to your computer and use it in GitHub Desktop.
Save rafpro/bca56226fa30d8ad8de2a71decf8b1a7 to your computer and use it in GitHub Desktop.
This will create a Google Voice "native" app on your computer
node_modules

This gist will create a Google Voice "native" app using nativefier.

Run it with npx which comes bundled with Node.js:

npx https://gist.github.com/kentcdodds/583a14c0863f7a61a3446e205c49bf5e

And a folder with the app will show up on your desktop.

#!/usr/bin/env node
const os = require('os')
const path = require('path')
const {default: nativefier} = require('nativefier')
const desktopDir = path.join(os.homedir(), 'Desktop')
// possible options, defaults unless specified otherwise
const options = {
name: 'Google Voice', // will be inferred if not specified
targetUrl: 'https://voice.google.com', // required
out: desktopDir,
overwrite: true,
icon: 'https://gist.githubusercontent.com/kentcdodds/583a14c0863f7a61a3446e205c49bf5e/raw/2e62fcaeb0195e97666a223c04bf1e7fb7c12f3a/voice.png',
hideWidnowFrame: true,
counter: true,
bounce: true,
showMenuBar: false,
fastQuit: false,
userAgent:
'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0',
internalUrls: '.*(accounts|voice).google.com.*',
singleInstance: true,
fileDownloadOptions: {
saveAs: true,
},
}
nativefier(options, function (error, appPath) {
if (error) {
console.error(error)
return
}
console.log('App has been nativefied to', appPath)
})
{
"name": "google-voice-nativefier",
"version": "1.0.0",
"description": "Creates a google voice app",
"bin": "./index.js",
"dependencies": {
"nativefier": "^42.0.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment