diff options
author | nobody <nobody@zotlabs.com> | 2021-04-05 23:15:01 -0700 |
---|---|---|
committer | nobody <nobody@zotlabs.com> | 2021-04-05 23:15:01 -0700 |
commit | 9359fc065c72243bd85f0fc3db842976f07183cc (patch) | |
tree | 37551feefe6fff472b9c346a7a8c3cd9080d8946 /view/js/mod_help.js | |
parent | 878be8fff0328ee4ab978de20e7e385244ac54ec (diff) | |
parent | 19daadbfd7f281e27dffdc53d0e8ebeb837e1ae3 (diff) | |
download | volse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.tar.gz volse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.tar.bz2 volse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'view/js/mod_help.js')
-rw-r--r-- | view/js/mod_help.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/view/js/mod_help.js b/view/js/mod_help.js index 107845c04..9c3591498 100644 --- a/view/js/mod_help.js +++ b/view/js/mod_help.js @@ -14,7 +14,7 @@ toc = {}; $(document).ready(function () { // Generate the table of contents in the side nav menu (see view/tpl/help.tpl) $('#doco-top-toc').toc({content: "#doco-content", headings: "h3,h4,h5,h6"}); - + $(".doco-section").find('a').each(function () { var url = document.createElement('a'); url.href = window.location; @@ -31,8 +31,6 @@ $(document).ready(function () { } }); - $(document.body).trigger("sticky_kit:recalc"); - toc.contentTop = []; toc.edgeMargin = 20; // margin above the top or margin from the end of the page toc.topRange = 200; // measure from the top of the viewport to X pixels down @@ -72,7 +70,7 @@ $(document).ready(function () { location.replace(newref) } - + // Determine language translations available from the language selector menu itself var langChoices = []; $('.lang-selector').find('.lang-choice').each(function (idx, a) { @@ -89,7 +87,7 @@ $(document).ready(function () { pathParts.push(help_language); pick_me = false; if($.inArray(path[i], langChoices) < 0) { - i--; + i--; } } } else { @@ -97,20 +95,20 @@ $(document).ready(function () { pathParts.push(path[i]); } } - + } // Update the address bar to reflect the loaded language window.history.replaceState({}, '', '/' + pathParts.join('/')); - + // Highlight the language in the language selector that is currently viewed $('.lang-selector').find('.lang-choice:contains("' + help_language + '")').addClass('active'); - + // Construct the links to the available translations based and populate the selector menu $('.lang-selector').find('.lang-choice').each(function (idx, a) { var langLink = []; for (var i = 0; i < pathParts.length; i++) { - + if(i === 1) { langLink.push($(a).html()); } else { @@ -120,5 +118,5 @@ $(document).ready(function () { } $(a).attr('href', '/' + langLink.join('/')); }); - + }); |