Changeset View
Changeset View
Standalone View
Standalone View
assets/src/bundles/browse/swhid-utils.js
Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | $(document).ready(() => { | ||||
if (window.innerHeight < 600 || window.innerWidth < 500) { | if (window.innerHeight < 600 || window.innerWidth < 500) { | ||||
tabSlideOptions['otherOffset'] = '20px'; | tabSlideOptions['otherOffset'] = '20px'; | ||||
} | } | ||||
// initiate the sliding identifiers tab | // initiate the sliding identifiers tab | ||||
$('#swh-identifiers').tabSlideOut(tabSlideOptions); | $('#swh-identifiers').tabSlideOut(tabSlideOptions); | ||||
// set the tab visible once the close animation is terminated | // set the tab visible once the close animation is terminated | ||||
$('#swh-identifiers').css('display', 'block'); | $('#swh-identifiers').addClass('d-none d-sm-block'); | ||||
$('.swhid-context-option').trigger('click'); | $('.swhid-context-option').trigger('click'); | ||||
// highlighted code lines changed | // highlighted code lines changed | ||||
$(window).on('hashchange', () => { | $(window).on('hashchange', () => { | ||||
addLinesInfo(); | addLinesInfo(); | ||||
}); | }); | ||||
// highlighted code lines removed | // highlighted code lines removed | ||||
$('body').click(() => { | $('body').click(() => { | ||||
addLinesInfo(); | addLinesInfo(); | ||||
}); | }); | ||||
}); | }); |