mirror of
https://github.com/neocities/neocities.git
synced 2025-08-06 09:34:57 +02:00
use keyboardjs instead of custom version
This commit is contained in:
parent
1400a090b6
commit
da2907e959
3 changed files with 972 additions and 0 deletions
|
@ -47,6 +47,7 @@
|
|||
<script src="/js/nav.min.js"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/typeahead.bundle.js"></script>
|
||||
<script src="/js/keyboard.js"></script>
|
||||
|
||||
<script>
|
||||
$("a#like").tooltip({html: true})
|
||||
|
|
|
@ -169,6 +169,15 @@
|
|||
})
|
||||
})
|
||||
|
||||
$().ready(function() {
|
||||
KeyboardJS.on('ctrl + s', function(event, keysPressed, keyComboString) {
|
||||
saveTextFile(false)
|
||||
event.preventDefault()
|
||||
return false
|
||||
});
|
||||
})
|
||||
|
||||
/*
|
||||
$(window).keypress(function(event) {
|
||||
if(event.ctrlKey == true && event.key == 's') {
|
||||
saveTextFile(false)
|
||||
|
@ -176,6 +185,7 @@
|
|||
return false
|
||||
}
|
||||
})
|
||||
*/
|
||||
|
||||
window.onbeforeunload = function() {
|
||||
if(unsavedChanges == true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue