Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
shower-presentation
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Шардт Максим Александрович
shower-presentation
Commits
d21fcdb2
Commit
d21fcdb2
authored
Nov 03, 2010
by
Vadim Makeev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optional fullscreen detection
parent
ad1c3298
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
script.js
scripts/script.js
+20
-6
No files found.
scripts/script.js
View file @
d21fcdb2
...
@@ -16,10 +16,18 @@ function enterFull() {
...
@@ -16,10 +16,18 @@ function enterFull() {
updateView
();
updateView
();
}
}
function
exitFull
(
e
)
{
function
exitFull
()
{
if
(
e
.
which
==
27
)
{
fullscreen
=
false
;
fullscreen
=
false
;
updateView
();
updateView
();
}
function
toggleFull
()
{
if
(
window
.
fullScreen
||
// Firefox
document
.
webkitFullScreen
||
// Webkit
screen
.
width
==
window
.
outerWidth
&&
screen
.
height
==
window
.
outerHeight
)
{
enterFull
();
}
else
{
exitFull
();
}
}
}
}
...
@@ -56,6 +64,12 @@ function updateView() {
...
@@ -56,6 +64,12 @@ function updateView() {
if
(
fullscreen
&&
!
backhash
[
url
.
hash
])
url
.
hash
=
slides
[
0
];
if
(
fullscreen
&&
!
backhash
[
url
.
hash
])
url
.
hash
=
slides
[
0
];
}
}
document
.
addEventListener
(
'keyup'
,
turnSlide
,
false
);
domSlides
[
0
].
addEventListener
(
'click'
,
enterFull
,
false
);
domSlides
[
0
].
addEventListener
(
'click'
,
enterFull
,
false
);
document
.
addEventListener
(
'keyup'
,
exitFull
,
false
);
\ No newline at end of file
window
.
addEventListener
(
'DOMContentLoaded'
,
toggleFull
,
false
);
window
.
addEventListener
(
'resize'
,
toggleFull
,
false
);
document
.
addEventListener
(
'keyup'
,
turnSlide
,
false
);
document
.
addEventListener
(
'keyup'
,
function
(
e
)
{
if
(
e
.
which
==
27
)
exitFull
();
},
false
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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