mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 12:40:08 +08:00
21 lines
537 B
CoffeeScript
21 lines
537 B
CoffeeScript
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: ->
|