mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 08:25:14 +00:00
28 lines
647 B
JavaScript
28 lines
647 B
JavaScript
//= require ./lib/_energize
|
|
//= require ./app/_copy
|
|
//= require ./app/_toc
|
|
//= require ./app/_lang
|
|
|
|
function adjustLanguageSelectorWidth() {
|
|
const elem = $('.dark-box > .lang-selector');
|
|
elem.width(elem.parent().width());
|
|
}
|
|
|
|
$(function() {
|
|
loadToc($('#toc'), '.toc-link', '.toc-list-h2', 10);
|
|
setupLanguages($('body').data('languages'));
|
|
$('.content').imagesLoaded( function() {
|
|
window.recacheHeights();
|
|
window.refreshToc();
|
|
});
|
|
|
|
$(window).resize(function() {
|
|
adjustLanguageSelectorWidth();
|
|
});
|
|
adjustLanguageSelectorWidth();
|
|
});
|
|
|
|
window.onpopstate = function() {
|
|
activateLanguage(getLanguageFromQueryString());
|
|
};
|