mirror of
https://github.com/torproject/support.git
synced 2025-02-21 01:41:04 +00:00
Move support-specific script into support form lego
Context: tpo/web/lego#58
This commit is contained in:
parent
b57eb8153b
commit
86f94a89e7
11
assets/static/fix-scroll.js
Normal file
11
assets/static/fix-scroll.js
Normal file
@ -0,0 +1,11 @@
|
||||
// Coming from search result page click
|
||||
if(window.location.hash !== "") {
|
||||
// Somehow collapse is not working sync and calling show directly after
|
||||
// yields no effect and there is no callback when it is ready
|
||||
setTimeout(() => {
|
||||
// Folds out the answer manually
|
||||
$(window.location.hash).collapse('show')
|
||||
// Avoids the answer being hidden by the floating header
|
||||
window.scrollTo(0, $(window.location.hash).position().top)
|
||||
}, 500)
|
||||
}
|
2
lego
2
lego
@ -1 +1 @@
|
||||
Subproject commit eed421981c7524670c61b0d5143f8670fa7631d5
|
||||
Subproject commit 05e0f876a860783799530e16391d7ad39ca68ce9
|
@ -5,6 +5,7 @@
|
||||
<meta name="description" content="{{ _('Defend yourself against tracking and surveillance. Circumvent censorship.') }} | {{ this.title }}">
|
||||
<link rel="stylesheet" href="{{ '/static/css/bootstrap.css'|asseturl }}">
|
||||
<link rel="stylesheet" href="{{ '/static/fonts/fontawesome/css/all.min.css'|asseturl }}" rel="stylesheet">
|
||||
<script src="{{ '/static/fix-scroll.js'|asseturl }}" ></script>
|
||||
<!-- Standard favicon -->
|
||||
<link rel="icon" type="image/x-icon" href="{{ '/static/images/favicon.ico'|asseturl }}">
|
||||
<!-- Recommended favicon format -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user