Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105199638
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
Sat, Mar 15, 09:33
Size
587 B
Mime Type
text/x-java
Expires
Mon, Mar 17, 09:33 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24942599
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