Plugin Directory

Changeset 2488881


Ignore:
Timestamp:
03/07/2021 01:01:48 PM (5 years ago)
Author:
klaetke
Message:

Version 1.3

Location:
fullscreen-button/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • fullscreen-button/trunk/fullscreen-button.php

    r2483262 r2488881  
    33 * Plugin Name: Fullscreen Button
    44 * Plugin URI: https://klaetke.com/wordpress-fullscreen-button
    5  * Description: A Button to set the Page in Fullscreen (Like the F11 Button). After Install use the following Shortcodes to integrate the Fullscreen Button. [fullscreen_button] or Alternative with Font Awesome Icon [fullscreen_button_fa] New: Alternate Icon SVG [fullscreen_button_a1]
    6  * Version: 1.2
     5 * Description: A Button to set the Page in Fullscreen (Like the F11 Button). After Install use the following Shortcodes to integrate the Fullscreen Button. [fullscreen_button] or Alternative with Font Awesome Icon [fullscreen_button_fa] New: Alternate Icon SVG [fullscreen_button_a1] [fullscreen_button_text]
     6 * Version: 1.3
    77 * Text Domain: klaetke.com
    88 * Author: Toni Klätke
     
    8181
    8282add_shortcode('fullscreen_button_a1', 'fullscreen_button_plugin_3');
     83
     84 function fullscreen_button_plugin_4($atts) {
     85    $Content .= '<a href="#full" id="goFS" onclick="toggleFullScreen()">Fullscreen</a>
     86<script>
     87        function toggleFullScreen() {
     88          var doc = window.document;
     89          var docEl = doc.documentElement;
     90
     91          var requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen || docEl.webkitRequestFullScreen || docEl.msRequestFullscreen;
     92          var cancelFullScreen = doc.exitFullscreen || doc.mozCancelFullScreen || doc.webkitExitFullscreen || doc.msExitFullscreen;
     93
     94          if(!doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement) {
     95            requestFullScreen.call(docEl);
     96          }
     97          else {
     98            cancelFullScreen.call(doc);
     99          }
     100        }
     101    </script>';
     102     
     103    return $Content;
     104}
     105
     106add_shortcode('fullscreen_button_text', 'fullscreen_button_plugin_4');
  • fullscreen-button/trunk/readme.txt

    r2483306 r2488881  
    1313
    1414### Usage
    15 Integrate the Shortcode in WordPress and you get the following Unicode Symbol ⛶ with the Full Screen Function. Full customize, for changing the size or color. The ⛶ Unicode Symbol works with the standard HTML text formats.
     15Integrate the Shortcode in WordPress and you get the following Unicode Symobol ⛶ with the Full Screen Function. Full customize, for changing the size or color. The ⛶ Unicode Symbol works with the standard HTML text formats.
    1616
    1717Update: Now with Support for Font Awesome. With a special Shortcode you get the Font Awesome Expand Icon for Fullscreen Mode.
     
    2121Fullscreen Button (Unicode Symbol) [fullscreen_button]
    2222Fullscreen Button (Font Awesome) [fullscreen_button_fa]
    23 Fullscreen Button (Alternate SVG Icon) [fullscreen_button_a1]
    2423
    2524## Screenshots
     
    3736= 1.2 =
    3837* Added an Alternate Fullscreen Icon. Shortcode: [fullscreen_button_a1]
     38
     39= 1.3 =
     40* Added a Text Version of the Fullscreen Button. Shortcode: [fullscreen_button_text]
Note: See TracChangeset for help on using the changeset viewer.