Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
server
team-presentation
Commits
87255938
Commit
87255938
authored
Jul 13, 2017
by
Hakim El Hattab
Browse files
localstorage feature test in notes plugin, fixes speaker view error in safari
parent
b04489b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugin/notes/notes.html
View file @
87255938
...
...
@@ -675,7 +675,7 @@
document
.
body
.
setAttribute
(
'
data-speaker-layout
'
,
value
);
// Persist locally
if
(
window
.
l
ocalStorage
)
{
if
(
supportsL
ocalStorage
()
)
{
window
.
localStorage
.
setItem
(
'
reveal-speaker-layout
'
,
value
);
}
...
...
@@ -687,7 +687,7 @@
*/
function
getLayout
()
{
if
(
window
.
l
ocalStorage
)
{
if
(
supportsL
ocalStorage
()
)
{
var
layout
=
window
.
localStorage
.
getItem
(
'
reveal-speaker-layout
'
);
if
(
layout
)
{
return
layout
;
...
...
@@ -701,6 +701,19 @@
}
function
supportsLocalStorage
()
{
try
{
localStorage
.
setItem
(
'
test
'
,
'
test
'
);
localStorage
.
removeItem
(
'
test
'
);
return
true
;
}
catch
(
e
)
{
return
false
;
}
}
function
zeroPadInteger
(
num
)
{
var
str
=
'
00
'
+
parseInt
(
num
);
...
...
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