-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c76fb93
commit 7a13ccd
Showing
10 changed files
with
181 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"music":"true","desktopDanmu":"false"} | ||
{"music":"false","desktopDanmu":"false"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
播放列表 | ||
1. 玫瑰 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>桌面弹幕</title> | ||
<script> | ||
window.$ = window.jQuery = require('../js/jquery.js'); | ||
require('./frameless'); | ||
</script> | ||
<style> | ||
body { | ||
overflow: hidden; | ||
-webkit-app-region: drag; | ||
|
||
} | ||
|
||
button { | ||
/*display: none;*/ | ||
-webkit-app-region: no-drag; | ||
position: fixed; | ||
|
||
} | ||
|
||
#wrap { | ||
width: 190px; | ||
height: 290px; | ||
border: 1px solid; | ||
} | ||
|
||
</style> | ||
</head> | ||
|
||
<body> | ||
|
||
<div id="wrap"> | ||
<button class="lock">锁定</button> | ||
<div id="danmu"></div> | ||
</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const { ipcRenderer } = require('electron'); | ||
|
||
ipcRenderer.on('danmu', (event, nn, txt) => { | ||
const danmu = document.getElementById('danmu'); | ||
danmu.innerHTML += '<p>' + nn + ':' + txt + '</p>'; | ||
danmu.scrollIntoView(false); | ||
}); | ||
|
||
$(document).ready(() => { | ||
$('#wrap').hover(() => { | ||
$('button').css('display', 'block'); | ||
$('#wrap').css('border', '1px solid'); | ||
}, () => { | ||
$('button').css('display', 'none'); | ||
$('#wrap').css('border', 'none'); | ||
} | ||
); | ||
$('button').click(() => { | ||
if ($('button').hasClass('lock')) { | ||
$('body').css('-webkit-app-region', 'no-drag'); | ||
$('button').text('移动').removeClass('lock').addClass('unlock'); | ||
} else if ($('button').hasClass('unlock')) { | ||
$('body').css('-webkit-app-region', 'drag'); | ||
$('button').text('锁定').removeClass('unlock').addClass('lock'); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
8/3/2016, 3:15:36 AM 点歌成功 | ||
8/3/2016, 3:16:21 AM 切歌成功 | ||
8/3/2016, 3:16:27 AM 点歌成功 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title></title> | ||
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.1.0.js"></script> | ||
<script> | ||
$(document).ready(() => { | ||
$('div').hover(() => { | ||
console.log('hover'); | ||
$('button').css('display', 'block'); | ||
}, () => { | ||
console.log('leave'); | ||
$('button').css('display', 'none'); | ||
}); | ||
}); | ||
</script> | ||
<style> | ||
button { | ||
/*display: none;*/ | ||
} | ||
|
||
div { | ||
width: 500px; | ||
height: 300px; | ||
color: #fff; | ||
border: 1px solid; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
|
||
<div> | ||
<button>按钮</button> | ||
</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title></title> | ||
<script> | ||
window.onload = () => { | ||
const add = document.getElementById('add'); | ||
const c = document.getElementById('content'); | ||
add.addEventListener('click', () => { | ||
c.innerHTML += '<p>aaaaa</p>'; | ||
window.scrollTo(c.scrollHeight); | ||
// c.scrollIntoView(false); | ||
}); | ||
}; | ||
</script> | ||
</head> | ||
<body> | ||
|
||
<div id="content"> | ||
</div> | ||
<button id="add">add</button> | ||
</body> | ||
</html> |