kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Added full screen mode plugin
rodzic
c39654917f
commit
7a17e7b216
|
@ -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);
|
||||
};
|
||||
|
||||
})();
|
|
@ -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"
|
||||
}
|
Ładowanie…
Reference in New Issue