mirror of
https://github.com/atom/atom.git
synced 2026-01-27 07:47:58 -05:00
🐧 💚 Mock native clipboard appropriately
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
crypto = require 'crypto'
|
||||
|
||||
# Using clipboard in renderer process is not safe on Linux.
|
||||
clipboard =
|
||||
if process.platform is 'linux'
|
||||
require('remote').require 'clipboard'
|
||||
else
|
||||
require 'clipboard'
|
||||
clipboard = require "./native-clipboard"
|
||||
|
||||
# Extended: Represents the clipboard used for copying and pasting in Atom.
|
||||
#
|
||||
|
||||
6
src/native-clipboard.coffee
Normal file
6
src/native-clipboard.coffee
Normal file
@@ -0,0 +1,6 @@
|
||||
# Using clipboard in renderer process is not safe on Linux.
|
||||
module.exports =
|
||||
if process.platform is 'linux'
|
||||
require('remote').require 'clipboard'
|
||||
else
|
||||
require 'clipboard'
|
||||
Reference in New Issue
Block a user