Loading assets/static/fix-scroll.js 0 → 100644 +11 −0 Original line number Diff line number Diff line // 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) } lego @ 05e0f876 Compare eed42198 to 05e0f876 Original line number Diff line number Diff line Subproject commit eed421981c7524670c61b0d5143f8670fa7631d5 Subproject commit 05e0f876a860783799530e16391d7ad39ca68ce9 templates/layout.html +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
assets/static/fix-scroll.js 0 → 100644 +11 −0 Original line number Diff line number Diff line // 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) }
lego @ 05e0f876 Compare eed42198 to 05e0f876 Original line number Diff line number Diff line Subproject commit eed421981c7524670c61b0d5143f8670fa7631d5 Subproject commit 05e0f876a860783799530e16391d7ad39ca68ce9
templates/layout.html +1 −0 Original line number Diff line number Diff line Loading @@ -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