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
Belgian Biodiversity Platform
yeti
Commits
82be07d6
Commit
82be07d6
authored
Apr 04, 2012
by
Julien Cigar
Browse files
Merge branch 'master' of
ssh://home.bebif.be/usr/local/repos/git/yeti
parents
7dfccd96
289a7dbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
core.js
View file @
82be07d6
...
...
@@ -36,7 +36,15 @@
Yeti
.
Str
.
trim
=
function
(
src
)
{
return
src
.
trim
?
src
.
trim
()
:
src
.
replace
(
/^
\s
+|
\s
+$/g
,
''
);
src
.
replace
(
/^
\s
+|
\s
+$/g
,
''
);
}
/* Yeti.Str.reverse
* Returns the string reversed.
*/
Yeti
.
Str
.
reverse
=
function
(
src
)
{
return
src
.
split
(
''
).
reverse
().
join
(
''
);
}
...
...
@@ -443,8 +451,7 @@
*/
Yeti
.
DOM
.
getWindowSize
=
function
()
{
return
typeof
(
window
.
innerHeight
==
'
number
'
)
?
{
return
typeof
(
window
.
innerHeight
)
==
'
number
'
?
{
height
:
window
.
innerHeight
,
width
:
window
.
innerWidth
}
:
document
.
body
&&
document
.
body
.
clientHeight
?
{
...
...
@@ -454,7 +461,26 @@
document
.
documentElement
.
clientHeight
?
{
height
:
document
.
documentElement
.
clientHeight
,
width
:
document
.
documentElement
.
clientWidth
}
:
undefined
;
}
:
undefined
}
/* Yeti.DOM.getScrollXY
* Returns the number of pixels that the document has already been
* scrolled.
*/
Yeti
.
DOM
.
getScrollXY
=
function
()
{
return
typeof
(
window
.
pageYOffset
)
==
'
number
'
?
{
Y
:
window
.
pageYOffset
,
X
:
window
.
pageXOffset
}
:
document
.
body
&&
document
.
body
.
scrollLeft
?
{
Y
:
document
.
body
.
scrollTop
,
X
:
document
.
body
.
scrollLeft
}
document
.
documentElement
&&
document
.
documentElement
.
scollLeft
?
{
Y
:
document
.
documentElement
.
scrollTop
,
X
:
document
.
documentElement
.
scrollLeft
}
:
{
Y
:
0
,
X
:
0
}
}
...
...
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