feat(screenshot-mode): Tiny feature for removing PII when taking debug screenshots

This commit is contained in:
Ben Gotow 2016-01-29 16:39:07 -08:00
parent 459eb26d4f
commit 89a30a058f
7 changed files with 69 additions and 0 deletions

View file

@ -0,0 +1,34 @@
@font-face {
font-family: 'Nylas-Pro';
font-style: normal;
font-weight: 200;
src: url('nylas://screenshot-mode/assets/BLOKKNeue-Regular.otf');
}
@font-face {
font-family: 'Nylas-Pro';
font-style: normal;
font-weight: 300;
src: url('nylas://screenshot-mode/assets/BLOKKNeue-Regular.otf');
}
@font-face {
font-family: 'Nylas-Pro';
font-style: normal;
font-weight: 400;
src: url('nylas://screenshot-mode/assets/BLOKKNeue-Regular.otf');
}
@font-face {
font-family: 'Nylas-Pro';
font-style: normal;
font-weight: 500;
src: url('nylas://screenshot-mode/assets/BLOKKNeue-Regular.otf');
}
@font-face {
font-family: 'Nylas-Pro';
font-style: normal;
font-weight: 600;
src: url('nylas://screenshot-mode/assets/BLOKKNeue-Regular.otf');
}

View file

@ -0,0 +1,21 @@
fs = require 'fs'
style = null
module.exports =
activate: ->
NylasEnv.commands.add "body", "window:toggle-screenshot-mode", ->
if not style
style = document.createElement('style')
style.innerText = fs.readFileSync(path.join(__dirname, '..', 'assets','font-override.css')).toString()
if style.parentElement
document.body.removeChild(style)
else
document.body.appendChild(style)
deactivate: ->
if style.parentElement
document.body.removeChild(style)
serialize: ->

View file

@ -0,0 +1,11 @@
{
"name": "screenshot-mode",
"version": "0.1.0",
"main": "./lib/main",
"description": "Replaces all text with blocks for taking screenshots without PII",
"license": "Proprietary",
"private": true,
"windowTypes": {
"all": true
}
}

View file

@ -63,6 +63,7 @@
{ label: 'Toggle Developer Tools', command: 'window:toggle-dev-tools' }
{ label: 'Toggle Component Regions', command: 'window:toggle-component-regions' }
{ label: 'Toggle React Remote', command: 'window:toggle-react-remote' }
{ label: 'Toggle Screenshot Mode', command: 'window:toggle-screenshot-mode' }
{ type: 'separator' }
{ label: 'Open Activity Window', command: 'application:show-work-window' }
{ type: 'separator' }

View file

@ -44,6 +44,7 @@
{ label: 'Toggle Developer &Tools', command: 'window:toggle-dev-tools' }
{ label: 'Toggle Component Regions', command: 'window:toggle-component-regions' }
{ label: 'Toggle React Remote', command: 'window:toggle-react-remote' }
{ label: 'Toggle Screenshot Mode', command: 'window:toggle-screenshot-mode' }
{ type: 'separator' }
{ label: 'Open Activity Window', command: 'application:show-work-window' }
{ type: 'separator' }

View file

@ -29,6 +29,7 @@
{ label: 'Toggle Developer &Tools', command: 'window:toggle-dev-tools' }
{ label: 'Toggle Component Regions', command: 'window:toggle-component-regions' }
{ label: 'Toggle React Remote', command: 'window:toggle-react-remote' }
{ label: 'Toggle Screenshot Mode', command: 'window:toggle-screenshot-mode' }
{ type: 'separator' }
{ label: 'Open Activity Window', command: 'application:show-work-window' }
{ type: 'separator' }