Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
bcb4e7be
Commit
bcb4e7be
authored
6 years ago
by
XhmikosR
Browse files
Options
Download
Email Patches
Plain Diff
Update anchor.min.js to v4.1.1.
parent
7a01f3c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
site/docs/4.1/assets/js/vendor/anchor.min.js
+3
-3
site/docs/4.1/assets/js/vendor/anchor.min.js
with
3 additions
and
3 deletions
+3
-3
site/docs/4.1/assets/js/vendor/anchor.min.js
+
3
-
3
View file @
bcb4e7be
/**
* AnchorJS - v4.1.
0
- 201
7
-0
9-20
* AnchorJS - v4.1.
1
- 201
8
-0
7-01
* https://github.com/bryanbraun/anchorjs
* Copyright (c) 201
7
Bryan Braun; Licensed MIT
* Copyright (c) 201
8
Bryan Braun; Licensed MIT
*/
!
function
(
A
,
e
){
"
use strict
"
;
"
function
"
==
typeof
define
&&
define
.
amd
?
define
([],
e
):
"
object
"
==
typeof
module
&&
module
.
exports
?
module
.
exports
=
e
():(
A
.
AnchorJS
=
e
(),
A
.
anchors
=
new
A
.
AnchorJS
)}(
this
,
function
(){
"
use strict
"
;
return
function
(
A
){
function
e
(
A
){
A
.
icon
=
A
.
hasOwnProperty
(
"
icon
"
)?
A
.
icon
:
"
"
,
A
.
visible
=
A
.
hasOwnProperty
(
"
visible
"
)?
A
.
visible
:
"
hover
"
,
A
.
placement
=
A
.
hasOwnProperty
(
"
placement
"
)?
A
.
placement
:
"
right
"
,
A
.
ariaLabel
=
A
.
hasOwnProperty
(
"
ariaLabel
"
)?
A
.
ariaLabel
:
"
Anchor
"
,
A
.
class
=
A
.
hasOwnProperty
(
"
class
"
)?
A
.
class
:
""
,
A
.
truncate
=
A
.
hasOwnProperty
(
"
truncate
"
)?
Math
.
floor
(
A
.
truncate
):
64
}
function
t
(
A
){
var
e
;
if
(
"
string
"
==
typeof
A
||
A
instanceof
String
)
e
=
[].
slice
.
call
(
document
.
querySelectorAll
(
A
));
else
{
if
(
!
(
Array
.
isArray
(
A
)
||
A
instanceof
NodeList
))
throw
new
Error
(
"
The selector provided to AnchorJS was invalid.
"
);
e
=
[].
slice
.
call
(
A
)}
return
e
}
function
i
(){
if
(
null
===
document
.
head
.
querySelector
(
"
style.anchorjs
"
)){
var
A
,
e
=
document
.
createElement
(
"
style
"
);
e
.
className
=
"
anchorjs
"
,
e
.
appendChild
(
document
.
createTextNode
(
""
)),
void
0
===
(
A
=
document
.
head
.
querySelector
(
'
[rel="stylesheet"], style
'
))?
document
.
head
.
appendChild
(
e
):
document
.
head
.
insertBefore
(
e
,
A
),
e
.
sheet
.
insertRule
(
"
.anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
"
,
e
.
sheet
.
cssRules
.
length
),
e
.
sheet
.
insertRule
(
"
*:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }
"
,
e
.
sheet
.
cssRules
.
length
),
e
.
sheet
.
insertRule
(
"
[data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }
"
,
e
.
sheet
.
cssRules
.
length
),
e
.
sheet
.
insertRule
(
'
@font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }
'
,
e
.
sheet
.
cssRules
.
length
)}}
this
.
options
=
A
||
{},
this
.
elements
=
[],
e
(
this
.
options
),
this
.
isTouchDevice
=
function
(){
return
!!
(
"
ontouchstart
"
in
window
||
window
.
DocumentTouch
&&
document
instanceof
DocumentTouch
)},
this
.
add
=
function
(
A
){
var
n
,
o
,
s
,
a
,
r
,
c
,
h
,
l
,
u
,
d
,
f
,
p
=
[];
if
(
e
(
this
.
options
),
"
touch
"
===
(
f
=
this
.
options
.
visible
)
&&
(
f
=
this
.
isTouchDevice
()?
"
always
"
:
"
hover
"
),
A
||
(
A
=
"
h2, h3, h4, h5, h6
"
),
0
===
(
n
=
t
(
A
)).
length
)
return
this
;
for
(
i
(),
o
=
document
.
querySelectorAll
(
"
[id]
"
),
s
=
[].
map
.
call
(
o
,
function
(
A
){
return
A
.
id
}),
r
=
0
;
r
<
n
.
length
;
r
++
)
if
(
this
.
hasAnchorJSLink
(
n
[
r
]))
p
.
push
(
r
);
else
{
if
(
n
[
r
].
hasAttribute
(
"
id
"
))
a
=
n
[
r
].
getAttribute
(
"
id
"
);
else
if
(
n
[
r
].
hasAttribute
(
"
data-anchor-id
"
))
a
=
n
[
r
].
getAttribute
(
"
data-anchor-id
"
);
else
{
u
=
l
=
this
.
urlify
(
n
[
r
].
textContent
),
h
=
0
;
do
{
void
0
!==
c
&&
(
u
=
l
+
"
-
"
+
h
),
c
=
s
.
indexOf
(
u
),
h
+=
1
}
while
(
-
1
!==
c
);
c
=
void
0
,
s
.
push
(
u
),
n
[
r
].
setAttribute
(
"
id
"
,
u
),
a
=
u
}
a
.
replace
(
/-/g
,
"
"
),(
d
=
document
.
createElement
(
"
a
"
)).
className
=
"
anchorjs-link
"
+
this
.
options
.
class
,
d
.
href
=
"
#
"
+
a
,
d
.
setAttribute
(
"
aria-label
"
,
this
.
options
.
ariaLabel
),
d
.
setAttribute
(
"
data-anchorjs-icon
"
,
this
.
options
.
icon
),
"
always
"
===
f
&&
(
d
.
style
.
opacity
=
"
1
"
),
"
"
===
this
.
options
.
icon
&&
(
d
.
style
.
font
=
"
1em/1 anchorjs-icons
"
,
"
left
"
===
this
.
options
.
placement
&&
(
d
.
style
.
lineHeight
=
"
inherit
"
)),
"
left
"
===
this
.
options
.
placement
?(
d
.
style
.
position
=
"
absolute
"
,
d
.
style
.
marginLeft
=
"
-1em
"
,
d
.
style
.
paddingRight
=
"
0.5em
"
,
n
[
r
].
insertBefore
(
d
,
n
[
r
].
firstChild
)):(
d
.
style
.
paddingLeft
=
"
0.375em
"
,
n
[
r
].
appendChild
(
d
))}
for
(
r
=
0
;
r
<
p
.
length
;
r
++
)
n
.
splice
(
p
[
r
]
-
r
,
1
);
return
this
.
elements
=
this
.
elements
.
concat
(
n
),
this
},
this
.
remove
=
function
(
A
){
for
(
var
e
,
i
,
n
=
t
(
A
),
o
=
0
;
o
<
n
.
length
;
o
++
)(
i
=
n
[
o
].
querySelector
(
"
.anchorjs-link
"
))
&&
(
-
1
!==
(
e
=
this
.
elements
.
indexOf
(
n
[
o
]))
&&
this
.
elements
.
splice
(
e
,
1
),
n
[
o
].
removeChild
(
i
));
return
this
},
this
.
removeAll
=
function
(){
this
.
remove
(
this
.
elements
)},
this
.
urlify
=
function
(
A
){
var
t
=
/
[
& +$,:;=?@"#{}|^~[`%!'<>
\]\.\/\(\)\*\\]
/g
;
return
this
.
options
.
truncate
||
e
(
this
.
options
),
A
.
trim
().
replace
(
/
\'
/gi
,
""
).
replace
(
t
,
"
-
"
).
replace
(
/-
{2,}
/g
,
"
-
"
).
substring
(
0
,
this
.
options
.
truncate
).
replace
(
/^-+|-+$/gm
,
""
).
toLowerCase
()},
this
.
hasAnchorJSLink
=
function
(
A
){
var
e
=
A
.
firstChild
&&
(
"
"
+
A
.
firstChild
.
className
+
"
"
).
indexOf
(
"
anchorjs-link
"
)
>-
1
,
t
=
A
.
lastChild
&&
(
"
"
+
A
.
lastChild
.
className
+
"
"
).
indexOf
(
"
anchorjs-link
"
)
>-
1
;
return
e
||
t
||!
1
}}});
\ No newline at end of file
!
function
(
A
,
e
){
"
use strict
"
;
"
function
"
==
typeof
define
&&
define
.
amd
?
define
([],
e
):
"
object
"
==
typeof
module
&&
module
.
exports
?
module
.
exports
=
e
():(
A
.
AnchorJS
=
e
(),
A
.
anchors
=
new
A
.
AnchorJS
)}(
this
,
function
(){
"
use strict
"
;
return
function
(
A
){
function
d
(
A
){
A
.
icon
=
A
.
hasOwnProperty
(
"
icon
"
)?
A
.
icon
:
"
"
,
A
.
visible
=
A
.
hasOwnProperty
(
"
visible
"
)?
A
.
visible
:
"
hover
"
,
A
.
placement
=
A
.
hasOwnProperty
(
"
placement
"
)?
A
.
placement
:
"
right
"
,
A
.
ariaLabel
=
A
.
hasOwnProperty
(
"
ariaLabel
"
)?
A
.
ariaLabel
:
"
Anchor
"
,
A
.
class
=
A
.
hasOwnProperty
(
"
class
"
)?
A
.
class
:
""
,
A
.
truncate
=
A
.
hasOwnProperty
(
"
truncate
"
)?
Math
.
floor
(
A
.
truncate
):
64
}
function
f
(
A
){
var
e
;
if
(
"
string
"
==
typeof
A
||
A
instanceof
String
)
e
=
[].
slice
.
call
(
document
.
querySelectorAll
(
A
));
else
{
if
(
!
(
Array
.
isArray
(
A
)
||
A
instanceof
NodeList
))
throw
new
Error
(
"
The selector provided to AnchorJS was invalid.
"
);
e
=
[].
slice
.
call
(
A
)}
return
e
}
this
.
options
=
A
||
{},
this
.
elements
=
[],
d
(
this
.
options
),
this
.
isTouchDevice
=
function
(){
return
!!
(
"
ontouchstart
"
in
window
||
window
.
DocumentTouch
&&
document
instanceof
DocumentTouch
)},
this
.
add
=
function
(
A
){
var
e
,
t
,
i
,
n
,
o
,
s
,
r
,
a
,
c
,
h
,
l
,
u
=
[];
if
(
d
(
this
.
options
),
"
touch
"
===
(
l
=
this
.
options
.
visible
)
&&
(
l
=
this
.
isTouchDevice
()?
"
always
"
:
"
hover
"
),
A
||
(
A
=
"
h2, h3, h4, h5, h6
"
),
0
===
(
e
=
f
(
A
)).
length
)
return
this
;
for
(
function
(){
if
(
null
===
document
.
head
.
querySelector
(
"
style.anchorjs
"
)){
var
A
,
e
=
document
.
createElement
(
"
style
"
);
e
.
className
=
"
anchorjs
"
,
e
.
appendChild
(
document
.
createTextNode
(
""
)),
void
0
===
(
A
=
document
.
head
.
querySelector
(
'
[rel="stylesheet"], style
'
))?
document
.
head
.
appendChild
(
e
):
document
.
head
.
insertBefore
(
e
,
A
),
e
.
sheet
.
insertRule
(
"
.anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
"
,
e
.
sheet
.
cssRules
.
length
),
e
.
sheet
.
insertRule
(
"
*:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }
"
,
e
.
sheet
.
cssRules
.
length
),
e
.
sheet
.
insertRule
(
"
[data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }
"
,
e
.
sheet
.
cssRules
.
length
),
e
.
sheet
.
insertRule
(
'
@font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }
'
,
e
.
sheet
.
cssRules
.
length
)}}(),
t
=
document
.
querySelectorAll
(
"
[id]
"
),
i
=
[].
map
.
call
(
t
,
function
(
A
){
return
A
.
id
}),
o
=
0
;
o
<
e
.
length
;
o
++
)
if
(
this
.
hasAnchorJSLink
(
e
[
o
]))
u
.
push
(
o
);
else
{
if
(
e
[
o
].
hasAttribute
(
"
id
"
))
n
=
e
[
o
].
getAttribute
(
"
id
"
);
else
if
(
e
[
o
].
hasAttribute
(
"
data-anchor-id
"
))
n
=
e
[
o
].
getAttribute
(
"
data-anchor-id
"
);
else
{
for
(
c
=
a
=
this
.
urlify
(
e
[
o
].
textContent
),
r
=
0
;
void
0
!==
s
&&
(
c
=
a
+
"
-
"
+
r
),
r
+=
1
,
-
1
!==
(
s
=
i
.
indexOf
(
c
)););
s
=
void
0
,
i
.
push
(
c
),
e
[
o
].
setAttribute
(
"
id
"
,
c
),
n
=
c
}
n
.
replace
(
/-/g
,
"
"
),(
h
=
document
.
createElement
(
"
a
"
)).
className
=
"
anchorjs-link
"
+
this
.
options
.
class
,
h
.
href
=
"
#
"
+
n
,
h
.
setAttribute
(
"
aria-label
"
,
this
.
options
.
ariaLabel
),
h
.
setAttribute
(
"
data-anchorjs-icon
"
,
this
.
options
.
icon
),
"
always
"
===
l
&&
(
h
.
style
.
opacity
=
"
1
"
),
"
"
===
this
.
options
.
icon
&&
(
h
.
style
.
font
=
"
1em/1 anchorjs-icons
"
,
"
left
"
===
this
.
options
.
placement
&&
(
h
.
style
.
lineHeight
=
"
inherit
"
)),
"
left
"
===
this
.
options
.
placement
?(
h
.
style
.
position
=
"
absolute
"
,
h
.
style
.
marginLeft
=
"
-1em
"
,
h
.
style
.
paddingRight
=
"
0.5em
"
,
e
[
o
].
insertBefore
(
h
,
e
[
o
].
firstChild
)):(
h
.
style
.
paddingLeft
=
"
0.375em
"
,
e
[
o
].
appendChild
(
h
))}
for
(
o
=
0
;
o
<
u
.
length
;
o
++
)
e
.
splice
(
u
[
o
]
-
o
,
1
);
return
this
.
elements
=
this
.
elements
.
concat
(
e
),
this
},
this
.
remove
=
function
(
A
){
for
(
var
e
,
t
,
i
=
f
(
A
),
n
=
0
;
n
<
i
.
length
;
n
++
)(
t
=
i
[
n
].
querySelector
(
"
.anchorjs-link
"
))
&&
(
-
1
!==
(
e
=
this
.
elements
.
indexOf
(
i
[
n
]))
&&
this
.
elements
.
splice
(
e
,
1
),
i
[
n
].
removeChild
(
t
));
return
this
},
this
.
removeAll
=
function
(){
this
.
remove
(
this
.
elements
)},
this
.
urlify
=
function
(
A
){
return
this
.
options
.
truncate
||
d
(
this
.
options
),
A
.
trim
().
replace
(
/
\'
/gi
,
""
).
replace
(
/
[
& +$,:;=?@"#{}|^~[`%!'<>
\]\.\/\(\)\*\\\n\t\b\v]
/g
,
"
-
"
).
replace
(
/-
{2,}
/g
,
"
-
"
).
substring
(
0
,
this
.
options
.
truncate
).
replace
(
/^-+|-+$/gm
,
""
).
toLowerCase
()},
this
.
hasAnchorJSLink
=
function
(
A
){
var
e
=
A
.
firstChild
&&-
1
<
(
"
"
+
A
.
firstChild
.
className
+
"
"
).
indexOf
(
"
anchorjs-link
"
),
t
=
A
.
lastChild
&&-
1
<
(
"
"
+
A
.
lastChild
.
className
+
"
"
).
indexOf
(
"
anchorjs-link
"
);
return
e
||
t
||!
1
}}});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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