Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121093422
scrollbarSize.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 8, 15:45
Size
587 B
Mime Type
text/x-java
Expires
Thu, Jul 10, 15:45 (2 d)
Engine
blob
Format
Raw Data
Handle
27250471
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
scrollbarSize.js
View Options
import
canUseDOM
from
'./canUseDOM'
;
var
size
;
export
default
function
scrollbarSize
(
recalc
)
{
if
(
!
size
&&
size
!==
0
||
recalc
)
{
if
(
canUseDOM
)
{
var
scrollDiv
=
document
.
createElement
(
'div'
);
scrollDiv
.
style
.
position
=
'absolute'
;
scrollDiv
.
style
.
top
=
'-9999px'
;
scrollDiv
.
style
.
width
=
'50px'
;
scrollDiv
.
style
.
height
=
'50px'
;
scrollDiv
.
style
.
overflow
=
'scroll'
;
document
.
body
.
appendChild
(
scrollDiv
);
size
=
scrollDiv
.
offsetWidth
-
scrollDiv
.
clientWidth
;
document
.
body
.
removeChild
(
scrollDiv
);
}
}
return
size
;
}
Event Timeline
Log In to Comment