1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 17:40:29 +00:00

Added full screen mode plugin

This commit is contained in:
Jeremy Ruston 2012-09-12 10:46:39 +01:00
parent c39654917f
commit 7a17e7b216
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,30 @@
/*\
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 */
"use strict";
var toggleFullScreen = function() {
if(document[$tw.browser.isFullScreen]) {
document[$tw.browser.cancelFullScreen]();
} else {
document.documentElement[$tw.browser.requestFullScreen]();
}
};
exports.startup = function() {
// Install the full screen handler
document.addEventListener("tw-full-screen",function(event) {
toggleFullScreen();
},false);
};
})();

View File

@ -0,0 +1,7 @@
{
"title": "$:/plugins/tiddlywiki/fullscreen",
"description": "Adds support for HTML5 full screen mode",
"author": "JeremyRuston",
"version": "0.0.0",
"coreVersion": ">=5.0.0"
}