mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-15 14:24:51 +00:00
3 lines
1.1 KiB
JavaScript
3 lines
1.1 KiB
JavaScript
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||
|
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||
|
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineOption("fullScreen",!1,function(t,l,o){var r,n;(o==e.Init&&(o=!1),!o!=!l)&&(l?(n=(r=t).getWrapperElement(),r.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:n.style.width,height:n.style.height},n.style.width="",n.style.height="auto",n.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",r.refresh()):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var l=e.state.fullScreenRestore;t.style.width=l.width,t.style.height=l.height,window.scrollTo(l.scrollLeft,l.scrollTop),e.refresh()}(t))}),e.toggleFullscreen=function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},e.commands.togglefullscreen=e.toggleFullscreen});
|