Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Web-Comic-Reader
Commits
ba033a54
Commit
ba033a54
authored
Apr 21, 2017
by
afzafri
Browse files
lightGallery fullscreen plugin
parent
8ef1f2d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
assets/js/lightGallery/lg-fullscreen.min.js
0 → 100644
View file @
ba033a54
/*! lg-fullscreen - v1.0.1 - 2016-09-30
* http://sachinchoolur.github.io/lightGallery
* Copyright (c) 2016 Sachin N; Licensed GPLv3 */
!
function
(
a
,
b
){
"
function
"
==
typeof
define
&&
define
.
amd
?
define
([
"
jquery
"
],
function
(
a
){
return
b
(
a
)}):
"
object
"
==
typeof
exports
?
module
.
exports
=
b
(
require
(
"
jquery
"
)):
b
(
jQuery
)}(
this
,
function
(
a
){
!
function
(){
"
use strict
"
;
var
b
=
{
fullScreen
:
!
0
},
c
=
function
(
c
){
return
this
.
core
=
a
(
c
).
data
(
"
lightGallery
"
),
this
.
$el
=
a
(
c
),
this
.
core
.
s
=
a
.
extend
({},
b
,
this
.
core
.
s
),
this
.
init
(),
this
};
c
.
prototype
.
init
=
function
(){
var
a
=
""
;
if
(
this
.
core
.
s
.
fullScreen
){
if
(
!
(
document
.
fullscreenEnabled
||
document
.
webkitFullscreenEnabled
||
document
.
mozFullScreenEnabled
||
document
.
msFullscreenEnabled
))
return
;
a
=
'
<span class="lg-fullscreen lg-icon"></span>
'
,
this
.
core
.
$outer
.
find
(
"
.lg-toolbar
"
).
append
(
a
),
this
.
fullScreen
()}},
c
.
prototype
.
requestFullscreen
=
function
(){
var
a
=
document
.
documentElement
;
a
.
requestFullscreen
?
a
.
requestFullscreen
():
a
.
msRequestFullscreen
?
a
.
msRequestFullscreen
():
a
.
mozRequestFullScreen
?
a
.
mozRequestFullScreen
():
a
.
webkitRequestFullscreen
&&
a
.
webkitRequestFullscreen
()},
c
.
prototype
.
exitFullscreen
=
function
(){
document
.
exitFullscreen
?
document
.
exitFullscreen
():
document
.
msExitFullscreen
?
document
.
msExitFullscreen
():
document
.
mozCancelFullScreen
?
document
.
mozCancelFullScreen
():
document
.
webkitExitFullscreen
&&
document
.
webkitExitFullscreen
()},
c
.
prototype
.
fullScreen
=
function
(){
var
b
=
this
;
a
(
document
).
on
(
"
fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg
"
,
function
(){
b
.
core
.
$outer
.
toggleClass
(
"
lg-fullscreen-on
"
)}),
this
.
core
.
$outer
.
find
(
"
.lg-fullscreen
"
).
on
(
"
click.lg
"
,
function
(){
document
.
fullscreenElement
||
document
.
mozFullScreenElement
||
document
.
webkitFullscreenElement
||
document
.
msFullscreenElement
?
b
.
exitFullscreen
():
b
.
requestFullscreen
()})},
c
.
prototype
.
destroy
=
function
(){
this
.
exitFullscreen
(),
a
(
document
).
off
(
"
fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg
"
)},
a
.
fn
.
lightGallery
.
modules
.
fullscreen
=
c
}()});
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment