mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
3b11713e88
Including introducing the terminology "tiddler bundles"
31 lines
659 B
JavaScript
31 lines
659 B
JavaScript
/*\
|
|
title: $:/plugins/tiddlywiki/fullscreen/init.js
|
|
type: application/javascript
|
|
module-type: browser-startup
|
|
|
|
Message handler for full screen mode
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false, Element: false */
|
|
"use strict";
|
|
|
|
var toggleFullScreen = function() {
|
|
if(document[$tw.browser.isFullScreen]) {
|
|
document[$tw.browser.cancelFullScreen]();
|
|
} else {
|
|
document.documentElement[$tw.browser.requestFullScreen](Element.ALLOW_KEYBOARD_INPUT);
|
|
}
|
|
};
|
|
|
|
exports.startup = function() {
|
|
// Install the full screen handler
|
|
document.addEventListener("tw-full-screen",function(event) {
|
|
toggleFullScreen();
|
|
},false);
|
|
};
|
|
|
|
})();
|