2016-01-12 02:40:23 +00:00
|
|
|
if (process.platform === 'linux' && process.type === 'renderer') {
|
2016-01-14 18:35:29 +00:00
|
|
|
// On Linux we could not access clipboard in renderer process.
|
2016-03-25 19:41:24 +00:00
|
|
|
module.exports = require('electron').remote.clipboard
|
2016-01-12 02:40:23 +00:00
|
|
|
} else {
|
2016-10-25 04:43:24 +00:00
|
|
|
const clipboard = process.atomBinding('clipboard')
|
|
|
|
|
|
|
|
// Read/write to find pasteboard over IPC since only main process is notified
|
|
|
|
// of changes
|
|
|
|
if (process.platform === 'darwin' && process.type === 'renderer') {
|
|
|
|
clipboard.readFindText = require('electron').remote.clipboard.readFindText
|
|
|
|
clipboard.writeFindText = require('electron').remote.clipboard.writeFindText
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = clipboard
|
2016-01-12 02:40:23 +00:00
|
|
|
}
|