Add: cool frame of the window, default: off
This commit is contained in:
@@ -4,18 +4,21 @@ var ipc = electron.ipcRenderer
|
||||
//title bar
|
||||
const customTitlebar = require('custom-electron-titlebar')
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const file = location.href.substr(-10)
|
||||
if (
|
||||
file == 'index.html' ||
|
||||
file == '/acct.html' ||
|
||||
file == 'tting.html'
|
||||
) {
|
||||
new customTitlebar.Titlebar({
|
||||
backgroundColor: customTitlebar.Color.fromHex('#000'),
|
||||
titleHorizontalAlignment: 'right',
|
||||
icon: '../../img/desk.png'
|
||||
ipc.send('frameCheck', '')
|
||||
ipc.on('frame', function(event, args) {
|
||||
const file = location.href.substr(-10)
|
||||
if (
|
||||
file == 'index.html' ||
|
||||
file == '/acct.html' ||
|
||||
file == 'tting.html'
|
||||
) {
|
||||
new customTitlebar.Titlebar({
|
||||
backgroundColor: customTitlebar.Color.fromHex('#000'),
|
||||
titleHorizontalAlignment: 'right',
|
||||
icon: '../../img/desk.png'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
onmessage = function(e) {
|
||||
@@ -65,6 +68,8 @@ onmessage = function(e) {
|
||||
ipc.send('theme-json-request', e.data[1])
|
||||
} else if (e.data[0] == 'ha') {
|
||||
ipc.send('ha', e.data[1])
|
||||
} else if (e.data[0] == 'frameSet') {
|
||||
ipc.send('frameSet', e.data[1])
|
||||
} else if (e.data[0] == 'ua') {
|
||||
ipc.send('ua', e.data[1])
|
||||
} else if (e.data[0] == 'aboutData') {
|
||||
|
Reference in New Issue
Block a user