Hello,

I have 18 lines of JavaScript code I want to work in TiddlyWiki. All it 
does is makes an image in a button fullscreen. I originally asked about 
this in this thread 
<https://groups.google.com/forum/#!topic/tiddlywiki/t1zZKjrpqsk> but was 
directed here.

The code:
<!-- A button with an image inside. Call the function we define below with 
this element as the argument. -->
<button onclick="fullscreen(this);"><img src="test.png"></button>

<script>
function fullscreen(element) {

    // Really we want the immediate child of the element we passed.
    element = element.children[0];

    // Request fullscreen.
    if (element.requestFullscreen) {
        element.requestFullscreen();
    } else if (element.mozRequestFullScreen) { /* Firefox */
        element.mozRequestFullScreen();
    } else if (element.webkitRequestFullscreen) { /* Chrome, Safari & Opera 
*/
        element.webkitRequestFullscreen();
    } else if (element.msRequestFullscreen) { /* IE/Edge */
        element.msRequestFullscreen();
    }
}
</script>

I don't code much, and not at all in JavaScript. I've looked at 
https://tiddlywiki.com/dev/ and found the following here 
<https://tiddlywiki.com/dev/#Developing%20plugins%20using%20Node.js%20and%20GitHub>
:

For example files see the plugins in the TiddlyWiki5 repository i.e. those 
> located at plugins/tiddlywiki/.
>

I made a post in the docs group 
<https://groups.google.com/forum/#!forum/tiddlywikidocs> about improving 
that, though I think it's waiting for approval.

Any pointers on this? I don't know where to start, I don't even know if it 
requires a plugin or not.

Kalcifer

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/95e54050-7fad-43c1-b742-c9b12f37a51c%40googlegroups.com.

Reply via email to