'How can I make fiddles enter full-screen?
I was trying to create some POC to try something with jwplayer but for some reason full screen for jwplayer is not working.
Is there any way to make full-screen work in jsfiddle in jwplayer?
Here is my jsfiddle
http://jsfiddle.net/hiteshbhilai2010/6YyXH/63/
Solution 1:[1]
You can click on Share button, then take the Full screen result URL, open it, go to full screen in player and then (optionally) click on F11
Another quick way: right click on jsfiddle result --> View frame source --> In the view source tab take the iframe URL and open it, the player full screen should work. If you are intending to use the fiddle as a demonstration, you can write some javascript to grab the url of the underlying iframe and open it in a new window.
Solution 2:[2]
Answering too late, but as no share button is available now, the new way for going full screen is copying the URL of your fiddle and append /show
to it.
Example : https://fiddle.net/xyz123/show/
This will show you only the result frame in full screen.
Solution 3:[3]
In firefox only:
- Right-Click the result window in Jsfiddle
- Select "This Frame"
- Select "Show Only This Frame"
- Page will reload with result only in full screen (without a "run this fiddle" banner in it.)
Sometimes however this won't work, I not shure why, but you can always add "/show" to the URL as Zameer Fouzan has said. If you don't want to see the "Edit in Jsfiddle" button you can always remove it:
- Add "/show" to the URL and press ENTER
- Press "run this fiddle" button
- Press F12 to enter developer mode in FireFox or Chrome
- In firefox press: CTRL + SHIFT + C to pick an element from the page
- Press the "Edit in Jsfiddle" button, the corresponding code will be highlighted
- Right-Click the highlighted line of code
- Select "Delete Node"
- Press F12 to close developer mode
Solution 4:[4]
Open your browser's console and run this:
const div = document.createElement('div')
div.classList.add('actionItem', 'visible')
div.style.cursor = 'pointer'
const a = document.createElement('a')
a.innerText = 'Fullscreen'
a.classList.add('aiButton')
a.title = 'Fullscreen'
a.addEventListener('click', function() {
document.querySelector('iframe[name=result]').requestFullscreen()
})
div.appendChild(a)
document.querySelector('.actionCont').insertBefore(div, document.getElementById('app-updates'))
This will add a button with the text "Fullscreen" next to the "Embed" button. If you click on it, your browser should fullscreen the result.
Or, if you don't want to paste something in the browser console every time you go to edit a fiddle, use a userscript:
// ==UserScript==
// @name JSFiddle Fullscreen
// @match *://jsfiddle.net/*
// @version 1.0
// @author GalaxyCat105
// @description Adds a fullscreen button in the JSFiddle navigation menu when editing a fiddle
// @grant none
// ==/UserScript==
const div = document.createElement('div')
div.classList.add('actionItem', 'visible')
div.style.cursor = 'pointer'
const a = document.createElement('a')
a.innerText = 'Fullscreen'
a.classList.add('aiButton')
a.title = 'Fullscreen'
a.addEventListener('click', function() {
document.querySelector('iframe[name=result]').requestFullscreen()
})
div.appendChild(a)
document.querySelector('.actionCont').insertBefore(div, document.getElementById('app-updates'))
Create a new script in your favorite userscript manager and copy-paste the code into it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | bad_coder |
Solution 3 | |
Solution 4 | shreyasm-dev |