Skip to content

Instantly share code, notes, and snippets.

@kentcdodds
Last active November 28, 2023 17:31
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kentcdodds/583a14c0863f7a61a3446e205c49bf5e to your computer and use it in GitHub Desktop.
Save kentcdodds/583a14c0863f7a61a3446e205c49bf5e 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 { buildNativefierApp } = require("nativefier");
const desktopDir = path.join(os.homedir(), "Desktop");
async function go() {
const appPath = await buildNativefierApp({
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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15",
internalUrls: ".*(accounts|voice).google.com.*",
singleInstance: true,
arch: "arm64",
fileDownloadOptions: {
saveAs: true,
},
});
console.log("App has been nativefied to", appPath);
}
go();
{
"name": "google-voice-nativefier",
"version": "1.0.0",
"description": "Creates a google voice app",
"bin": "./index.js",
"dependencies": {
"nativefier": "^52.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment