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
bdd11af0
Commit
bdd11af0
authored
Nov 01, 2010
by
Vadim Makeev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jquery is dropped
parent
39b959e2
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
224 deletions
+51
-224
jquery.js
scripts/jquery.js
+0
-166
script.js
scripts/script.js
+51
-58
No files found.
scripts/jquery.js
deleted
100644 → 0
View file @
39b959e2
This diff is collapsed.
Click to expand it.
scripts/script.js
View file @
bdd11af0
$
(
function
()
{
var
domSlides
=
document
.
querySelectorAll
(
'section.slide'
),
url
=
document
.
location
,
slides
=
[],
backhash
=
{},
linkScreen
=
document
.
querySelector
(
'link[title=screen]'
),
linkProjection
=
document
.
querySelector
(
'link[title=projection]'
);
var
domSlides
=
$
(
'section.slide'
),
for
(
var
i
=
0
,
len
=
domSlides
.
length
;
i
<
len
;
i
++
)
{
location
=
document
.
location
,
var
id
=
domSlides
[
i
].
id
;
slides
=
[],
slides
[
i
]
=
'#'
+
id
;
backhash
=
{},
backhash
[
'#'
+
id
]
=
i
;
linkScreen
=
$
(
'link[title=screen]'
),
}
linkProjection
=
$
(
'link[title=projection]'
);
for
(
var
i
=
0
,
len
=
domSlides
.
length
;
i
<
len
;
i
++
)
{
function
fullScreen
()
{
var
id
=
domSlides
[
i
].
id
;
return
window
.
screenX
==
0
&&
slides
[
i
]
=
'#'
+
id
;
window
.
screenY
==
0
&&
backhash
[
'#'
+
id
]
=
i
;
screen
.
width
==
window
.
outerWidth
&&
}
screen
.
height
==
window
.
outerHeight
;
}
function
fullScreen
()
{
function
turnSlide
(
e
)
{
return
window
.
screenX
==
0
&&
if
(
!
fullScreen
())
return
;
window
.
screenY
==
0
&&
var
current
=
backhash
[
url
.
hash
],
screen
.
width
==
window
.
outerWidth
&&
target
,
screen
.
height
==
window
.
outerHeight
;
command
;
switch
(
e
.
which
)
{
case
33
:
// PgUp
case
38
:
// Up
case
37
:
// Left
current
--
;
break
;
case
34
:
// PgDown
case
40
:
// Down
case
39
:
// Right
current
++
;
break
;
case
32
:
// Space
current
+=
e
.
shiftKey
?
-
1
:
1
;
break
;
default
:
return
;
}
}
target
=
slides
[
current
];
function
turnSlide
(
e
)
{
e
.
preventDefault
();
if
(
!
fullScreen
()
)
return
;
if
(
target
)
url
.
hash
=
target
;
var
current
=
backhash
[
location
.
hash
],
}
target
,
command
;
switch
(
e
.
which
)
{
case
33
:
// PgUp
case
38
:
// Up
case
37
:
// Left
current
--
;
break
;
case
34
:
// PgDown
case
40
:
// Down
case
39
:
// Right
current
++
;
break
;
case
32
:
// Space
current
+=
e
.
shiftKey
?
-
1
:
1
;
break
;
default
:
return
;
}
target
=
slides
[
current
];
e
.
preventDefault
();
if
(
target
)
location
.
hash
=
target
;
}
function
updateView
()
{
var
fullscreen
=
fullScreen
();
linkScreen
.
attr
(
'disabled'
,
fullscreen
);
linkProjection
.
attr
(
'disabled'
,
!
fullscreen
);
if
(
fullscreen
&&
!
backhash
[
location
.
hash
])
location
.
hash
=
slides
[
0
];
}
$
(
document
).
keyup
(
turnSlide
);
$
(
window
).
function
updateView
()
{
ready
(
updateView
).
var
fullscreen
=
fullScreen
();
resize
(
updateView
);
linkScreen
.
disabled
=
fullscreen
;
linkProjection
.
disabled
=
!
fullscreen
;
if
(
fullscreen
&&
!
backhash
[
url
.
hash
])
url
.
hash
=
slides
[
0
];
}
});
window
.
addEventListener
(
'DOMContentLoaded'
,
updateView
,
false
);
window
.
addEventListener
(
'resize'
,
updateView
,
false
);
document
.
addEventListener
(
'keyup'
,
turnSlide
,
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