Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
my-cucumbers-ru-github-io
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
Лотуга Данила Сергеевич
my-cucumbers-ru-github-io
Commits
daddeee6
Commit
daddeee6
authored
Dec 08, 2012
by
Vadim Makeev
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #91 from EvgenyZhlobo/f5-hotkeys
Add F5 hotkey
parents
4f62967b
26b6b855
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
shower.js
shower.js
+25
-1
No files found.
shower.js
View file @
daddeee6
...
...
@@ -483,7 +483,7 @@ window.shower = (function(window, document, undefined) {
},
false
);
document
.
addEventListener
(
'keydown'
,
function
(
e
)
{
// Shortcut for alt,
shift
and meta keys
// Shortcut for alt,
ctrl
and meta keys
if
(
e
.
altKey
||
e
.
ctrlKey
||
e
.
metaKey
)
{
return
;
}
var
currentSlideNumber
=
shower
.
getCurrentSlideNumber
(),
...
...
@@ -491,6 +491,30 @@ window.shower = (function(window, document, undefined) {
switch
(
e
.
which
)
{
case
116
:
// F5
e
.
preventDefault
();
if
(
shower
.
isListMode
())
{
var
slideNumber
=
e
.
shiftKey
?
currentSlideNumber
:
0
;
shower
.
go
(
slideNumber
);
if
(
isHistoryApiSupported
)
{
history
.
pushState
(
null
,
null
,
url
.
pathname
+
'?full'
+
shower
.
getSlideHash
(
slideNumber
));
}
shower
.
enterSlideMode
();
shower
.
updateProgress
(
slideNumber
);
shower
.
updateCurrentAndPassedSlides
(
slideNumber
);
shower
.
runSlideshowIfPresented
(
slideNumber
);
}
else
{
if
(
isHistoryApiSupported
)
{
history
.
pushState
(
null
,
null
,
url
.
pathname
+
shower
.
getSlideHash
(
currentSlideNumber
));
}
shower
.
enterListMode
();
shower
.
scrollToSlide
(
currentSlideNumber
);
}
break
;
case
13
:
// Enter
if
(
shower
.
isListMode
()
&&
-
1
!==
currentSlideNumber
)
{
e
.
preventDefault
();
...
...
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