Browse Source

Изменить 'ace/index.html'

master
KaiSD 5 years ago
parent
commit
d194d04192
1 changed files with 27 additions and 14 deletions
  1. +27
    -14
      ace/index.html

+ 27
- 14
ace/index.html View File

@@ -50,8 +50,8 @@
<div class="toolbar"> <div class="toolbar">
<!--<button id="btnSave" onClick="save()" class="btn btn_g">save</button>--> <!--<button id="btnSave" onClick="save()" class="btn btn_g">save</button>-->
<button id="btnUndo" onClick="editor.undo()" class="btn">↶</button> <button id="btnUndo" onClick="editor.undo()" class="btn">↶</button>
<button id="btnRedo" onClick="editor.redo()" class="btn_g">↷</button>
<button id="btnFs" onclick="openFullscreen();">◻</button>
<button id="btnRedo" onClick="editor.redo()" class="btn btn_g">↷</button>
<button id="btnFs" onclick="openFullscreen() class="btn"">◻</button>
</div> </div>
<div class="inner" id="editor"></div> <div class="inner" id="editor"></div>
@@ -99,20 +99,33 @@
} }
}); });


function openFullscreen() {
var elem = document.documentElement;
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.mozRequestFullScreen) { /* Firefox */
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) { /* IE/Edge */
elem.msRequestFullscreen();
function fullscreen() {
if (window.fullScreen) {
var elem = document.documentElement;
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.mozRequestFullScreen) { /* Firefox */
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) { /* IE/Edge */
elem.msRequestFullscreen();
}
}
else {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
}
} }
}
window.editor = editor;
window.editor = editor;
</script> </script>




Loading…
Cancel
Save