Skip to content

Commit 48df839

Browse files
authored
chore: Remove unnecessary JS file (#5112)
1 parent 8deda7b commit 48df839

4 files changed

Lines changed: 5 additions & 57 deletions

File tree

static/js/public/distro-install.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,5 @@ import screenshots from "./snap-details/screenshots";
22
import videos from "./snap-details/videos";
33
import initExpandableArea from "./expandable-area";
44
import triggerEventWhenVisible from "./ga-scroll-event";
5-
import { initLinkScroll } from "./scroll-to";
65

7-
export {
8-
screenshots,
9-
initExpandableArea,
10-
triggerEventWhenVisible,
11-
initLinkScroll,
12-
videos,
13-
};
6+
export { screenshots, initExpandableArea, triggerEventWhenVisible, videos };

static/js/public/scroll-to.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

static/sass/styles.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,3 +507,7 @@ dl {
507507
}
508508
}
509509
}
510+
511+
html {
512+
scroll-behavior: smooth;
513+
}

templates/store/snap-distro-install.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -263,19 +263,10 @@ <h4 class="p-card__title">
263263
{% include "store/snap-details/_templates.html" %}
264264
{% endblock %}
265265

266-
{% block scripts_includes %}
267-
<script src="{{ static_url('js/dist/distro-install.js') }}" defer></script>
268-
{% endblock %}
269266
{% block scripts %}
270267
<script>
271268
window.addEventListener("DOMContentLoaded", function() {
272269
Raven.context(function () {
273-
try {
274-
snapcraft.public.distroInstall.initLinkScroll(document.querySelector(".js-install"), { offset: 20 });
275-
} catch(e) {
276-
Raven.captureException(e);
277-
}
278-
279270
try {
280271
snapcraft.public.distroInstall.triggerEventWhenVisible("#snippet-snap-install-stable")
281272
} catch(e) {

0 commit comments

Comments
 (0)