Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sshop
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
sshop
Merge requests
!29
Issue # 3523428: CSPELL fixes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue # 3523428: CSPELL fixes
issue/sshop-3523428:3523428-fix-cspell--
into
8.x-1.x
Overview
0
Commits
11
Pipelines
12
Changes
8
Merged
Daniel Rodriguez
requested to merge
issue/sshop-3523428:3523428-fix-cspell--
into
8.x-1.x
1 month ago
Overview
0
Commits
11
Pipelines
12
Changes
8
Expand
Closes
#3523428
0
0
Merge request reports
Compare
8.x-1.x
version 10
f5e1e13a
1 month ago
version 9
9a01a88c
1 month ago
version 8
7898a906
1 month ago
version 7
16d7bb0d
1 month ago
version 6
048de4bc
1 month ago
version 5
b05e6c72
1 month ago
version 4
e8bd7eb1
1 month ago
version 3
10452c2e
1 month ago
version 2
90ed5e1e
1 month ago
version 1
1dbaf132
1 month ago
8.x-1.x (base)
and
latest version
latest version
5bc51d43
11 commits,
1 month ago
version 10
f5e1e13a
10 commits,
1 month ago
version 9
9a01a88c
9 commits,
1 month ago
version 8
7898a906
8 commits,
1 month ago
version 7
16d7bb0d
7 commits,
1 month ago
version 6
048de4bc
6 commits,
1 month ago
version 5
b05e6c72
5 commits,
1 month ago
version 4
e8bd7eb1
4 commits,
1 month ago
version 3
10452c2e
3 commits,
1 month ago
version 2
90ed5e1e
2 commits,
1 month ago
version 1
1dbaf132
1 commit,
1 month ago
8 files
+
182
−
123
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
Search (e.g. *.vue) (Ctrl+P)
js/sshop.anchor_scroll.js
+
32
−
29
Options
/**
* @file
* Contain code for animation scroll with ach
n
ors.
* Contain code for animation scroll with a
n
chors.
*/
(
function
(
$
,
Drupal
)
{
'
use strict
'
;
Drupal
.
behaviors
.
sshopAnchorScroll
=
{
attach
:
function
(
context
)
{
var
speed
=
500
;
var
navbarHeight
=
$
(
'
header.navbar-fixed-top
'
,
context
).
height
();
attach
:
(
context
)
=>
{
const
speed
=
500
;
let
navbarHeight
=
$
(
'
header.navbar-fixed-top
'
,
context
).
height
();
if
(
typeof
navbarHeight
!==
'
undefined
'
)
{
navbarHeight
+=
40
;
}
else
{
}
else
{
navbarHeight
=
0
;
}
var
dateToggle
=
'
a[href*=
\\
#]:not([href=
\\
#]):not([data-toggle=tab])
'
;
const
dateToggle
=
'
a[href*=
\\
#]:not([href=
\\
#]):not([data-toggle=tab])
'
;
$
(
dateToggle
,
context
).
on
(
'
click
'
,
function
()
{
var
locationReplace
=
location
.
pathname
.
replace
(
/^
\/
/
,
''
);
if
(
locationReplace
===
this
.
pathname
.
replace
(
/^
\/
/
,
''
)
&&
location
.
hostname
===
this
.
hostname
)
{
const
locationReplace
=
window
.
location
.
pathname
.
replace
(
/^
\/
/
,
''
);
var
target
=
$
(
this
.
hash
);
var
hashSlice
=
'
[name=
'
+
this
.
hash
.
slice
(
1
)
+
'
]
'
;
if
(
locationReplace
===
this
.
pathname
.
replace
(
/^
\/
/
,
''
)
&&
window
.
location
.
hostname
===
this
.
hostname
)
{
let
target
=
$
(
this
.
hash
);
const
hashSlice
=
`[name=
${
this
.
hash
.
slice
(
1
)}
]`
;
target
=
target
.
length
?
target
:
$
(
hashSlice
);
if
(
target
.
length
)
{
$
(
'
html,body
'
,
context
).
animate
({
scrollTop
:
target
.
offset
().
top
-
navbarHeight
},
speed
);
/* eslint-disable-next-line no-jquery/no-animate */
$
(
'
html,body
'
,
context
).
animate
(
{
scrollTop
:
target
.
offset
().
top
-
navbarHeight
,
},
speed
,
);
}
}
});
// Executed on page load with URL containing an anchor tag.
if
(
$
(
location
.
href
.
split
(
'
#
'
)[
1
]))
{
var
hash
=
location
.
href
.
split
(
'
#
'
)[
1
];
var
target
=
$
(
'
#
'
+
hash
);
var
$reviewsTab
=
$
(
'
a[href="#reviews"]
'
,
context
);
if
(
$
(
window
.
location
.
href
.
split
(
'
#
'
)[
1
]))
{
const
hash
=
window
.
location
.
href
.
split
(
'
#
'
)[
1
];
const
target
=
$
(
`#
${
hash
}
`
);
const
$reviewsTab
=
$
(
'
a[href="#reviews"]
'
,
context
);
if
(
target
.
length
)
{
// Display Reviews tab for comment anchors.
if
(
hash
.
indexOf
(
'
comment
'
)
!==
-
1
&&
$reviewsTab
.
length
!==
0
)
{
$reviewsTab
.
tab
(
'
show
'
);
}
$
(
'
html,body
'
,
context
).
animate
({
scrollTop
:
target
.
offset
().
top
-
navbarHeight
},
speed
);
/* eslint-disable-next-line no-jquery/no-animate */
$
(
'
html,body
'
,
context
).
animate
(
{
scrollTop
:
target
.
offset
().
top
-
navbarHeight
,
},
speed
,
);
return
false
;
}
}
}
},
};
})(
window
.
jQuery
,
window
.
Drupal
);
Loading