Food and Nutrition Bulletin: SAGE Journals

SJ Twitter Card 1557144152440

Food and Nutrition Bulletin,”); ]]> 1) $(this).text($(this).text().replace(moreNumber, moreNumber – 1)); else // if only one was hidden, no need to expand $(this).parent().css(“display”, “none”); } }); } } } }); } function cpTitlesDates() { if (‘{}’===’cp’ || ‘{}’===’cpv’) { $(‘.pubDate-left’).addClass(‘not-show-important’); } } function deniedPdfAccess() { //console.debug(‘Denial PDF button clicked’); if ($(‘#accessOptionsTop’).length > 0) { // clicked on page with access denial bar toggleDenialBar(true); $(‘#accessOptionsTop input[name=”login”]’).focus(); } else { // no access denial bar window.location = ‘/doi/pdf/’; } } function accesibilityImageAltText() { $(‘.moreFromThisJournalModules img’).each(function(){ if ($(this).attr(‘alt’)===undefined) $(this).attr(‘alt’, ”); }); $(‘.portalResourcesContainer img, .tellUsImage img, img.relatedJournalsImageContainer’).attr(‘alt’, ”); $(‘.relatedJournalsTextContainer’).each(function(){ let $journalText = $(this); $journalText.closest(‘.relatedJournalsColumn>a’).append($journalText.text()); $journalText.remove(); }); $(‘.relatedJournalsImageContainer img’).each(function(){ let $coverImage = $(this); let $parent = $(this).parent(); $coverImage.addClass(‘relatedJournalsImageContainer’); $coverImage.prependTo($coverImage.closest(‘.relatedJournalsColumn>a’)); $parent.remove(); }); $(‘td.savedSearch.savedResult:nth-child(4) img’).attr(‘alt’, function() { return $(this).attr(‘alt’).replace(‘alert type’, ‘saved date’); }) $(‘td.savedSearch.savedResult:nth-child(5) img’).attr(‘alt’, function() { return $(this).attr(‘alt’).replace(‘alert type’, ‘last run date’); }) } function checkJournalHomeLinks(){ //SAGE-4019 if (inJournalHome()){ if ($(‘.journalBoardViewAllButton a’).length && $(‘.journalBoardViewAllButton a’).attr(‘href’).indexOf(‘/connected/’)!=-1){ $(‘.journalBoardViewAllButton a’).attr(‘href’, ‘/editorial-board/fnb’); } if ($(‘.journalPublishViewAllButton a’).length && $(‘.journalPublishViewAllButton a’).attr(‘href’).indexOf(‘{}’)!=-1){ let link=$(‘.menuXml.journalMenus a[data-item-name=”view-submit-paper”]’).attr(‘href’); if (link===”#”) link=$(‘.menuXml.journalMenus a[data-item-name=”Submit Now”]’).attr(‘href’); if (link===undefined) link=$(‘.menuXml.journalMenus a[data-item-name=”Submit Now “]’).attr(‘href’); if (link!==undefined) $(‘.journalPublishViewAllButton a’).attr(‘href’, link); } $(‘.journalCarouselTextButton a’).each(function (){ if ($(this).attr(‘href’).indexOf(‘/connected/’)!=-1 && $(this).text().indexOf(‘More’)!==-1){ $(this).attr(‘href’, ‘/description/fnb’); } }); } } $(‘.purchaseAccessDropZone’).appendTo(‘.accessDenialWidget article’); if ($(‘.creative-commons-badge.cc-by’).length){ console.debug(‘Hiding permissions button due to CC-BY type of article.’); $(‘a.permissionsTool’).closest(‘div’).css(‘display’, ‘none’); } else $(‘a.permissionsTool’).closest(‘div’).css(‘display’, ‘flex’); // display denial access bar if user not authenticated or in PB edit mode try { if (!hasArticleAccessHeuristic() || $(‘.pb-wrap.pb-widget’).length > 0) $(‘.pb-ui .accessOptionsBar’).css(‘display’, ‘block’); else $(‘.pb-ui .accessOptionsBar’).hide(); } catch(e){ $(‘.pb-ui .accessOptionsBar’).hide(); } if ($(‘span.related-Article-wrapper span’).length===0) $(‘span.related-Article-wrapper’).hide(); cpTitlesDates(); // Add data module attributes in related journals HTML widget $(“.otherSociety”).attr(“data-module-name”, “related-journals”); $(“.otherSocietyButton #viewMoreText”).attr(“data-item-name”, “view-more”); $(“.otherSocietyButton #viewLessText”).attr(“data-item-name”, “view-fewer”); $(“.otherSocietyButton #viewFewerText”).attr(“data-item-name”, “view-fewer”); $(‘#share-tabs ul li a[title=”show Social Media”]’).attr(“data-item-name”, “view-social-media”); $(‘#share-tabs ul li a[title=”show Email”]’).attr(“data-item-name”, “view-email”); $(‘#share-tabs ul li a[title=”show Share Access”]’).attr(“data-item-name”, “view-share-access”); //Move related asrticles indication into proper place: $(‘span.related-Article-wrapper’).each(function() { $(this).insertAfter($(this).closest(‘#texttabcontent, .articleMeta.ja’).find(‘div.articleInformation’)); }); $(‘.related-article-title’).text(function() { return $(this).text().replace(/s*:/, ‘: ‘); }); $(‘.online-pub-date’).text(function() { return $(this).text().replace(/-/g, ‘ ‘); }); $(‘.contentItemVol’).text(function() { return $(this).text().replace(‘Vol 0,’, ”).replace(‘Vol.’, ‘Vol ‘).replace(/s*,/, ‘,’); }); $(‘.issueFormat’).text(function() { return $(this).text().replace(‘issue’, ‘Issue’).replace(‘vol.’, ‘Vol’).replace(/s*,/, ‘,’); }); //Remove trailing dot from a.deleteAccountLink $(‘a.deleteAccountLink’).text(‘Delete your account’); //Remove trailing dot from a.deleteAccountLink $(‘a#copyToClipBoard’).text(‘Copy to Clipboard’); // Rename “Views” to “Views and downloads” $(‘.view-count’).text(function() { if (inJournalScope()) return $(this).text().replace(‘Views:’, ‘Views & downloads:’); else return $(this).text(); }); // go back button $(‘#goBackButton’).click(function() { window.history.back(); }); // Keep only anchor element if already in citedBy page if ($(‘.view-all-citedBy a’).attr(‘href’) === window.location.pathname) $(‘.view-all-citedBy a’).attr(‘href’, ”); // Add #top-content-scroll on ‘View All’ citedBy link $(‘.view-all-citedBy a’).attr(‘href’, $(‘.view-all-citedBy a’).attr(‘href’) + ‘#top-content-scroll’); // Change MR/MC panel text $(‘#mostReadCitedPage .online-pub-date’).text(function() { return $(this).text().replace(“Online publication date”, “First published”); }); //Wait for images to load, before deciding whteher to move the related journals $(‘.journalHomeFourRight’).imagesLoaded().always(function(){ moveRelatedJournals(); //console.debug(‘Ad(right) image is loaded’); }); if (!inJournalScope() && $(‘#mainSearchBar select.filterOption option[disabled]’).length>0){ $(‘#mainSearchBar select.filterOption’).attr(‘disabled’,”); } // Fix for ‘more…’ label falling into 2nd line if ($(‘.authors .more-than’).length && $(‘.authors .more-than’).offset().left li’).attr(‘role’, ‘tab’); //Add Discipline button in browse publications mobile view if ($(‘.browsePublications’).length>0 && $(‘div.browseDiscipline’).length===1){ $(‘div.browseDiscipline’).clone().insertBefore($(‘.browsePublications .actions’)); } // search results (first 6 journals) if ($(‘.followResultsWidget .expand-all-microsite’).length==0) { $(‘.search-page-body’).prepend(‘.filter-tag.pub-tag-filter{display:block}’); } // Show lean library banner only if user has full access if ($(‘.articleBadges .accessIcon.openAccess, .articleBadges .accessIcon.freeAccess’).length>0) $(‘.lean-library-ft p.ll-message-oa’).removeClass(‘doNotShow’); else if ($(‘.articleBadges .accessIcon.fullAccess’).length>0) $(‘.lean-library-ft p.ll-message’).removeClass(‘doNotShow’); if ($(‘.PDFTool.pdf-no-access’).length===0) $(‘div.lean-library-ft’).removeClass(‘doNotShow’); //By default check the Remember Me box in login form $(‘.remember .keepMeLogin input’).prop(‘checked’, true); /* try{ var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutationRecord) { if (mutationRecord.type == ‘childList’) { //console.log(‘A child node has been added or removed.’); let refPopup=document.getElementById(‘openBalloon’); if (refPopup!==null){ if (refPopup.style.right===’0px’) { addClass(‘openBalloon’, ‘flip-balloon’); //let ref=$(refPopup).closest(‘span.ref’).prev(‘a.ref’)[0]; //if ($(ref).width()>250 || ref.getBoundingClientRect().left<0.6*window.innerWidth) // addClass('openBalloon', 'pull-left'); } } } }); }); var target = document.getElementById('25e8d4fe-c5d2-4686-bdef-3b125e01db4b'); if (target) observer.observe(target, {attributes:false, childList:true, subtree:true }); } catch(e) { } */ initLoginBox(); //specialCollectionDuplicate(); removeTlaFromTaxonomyFacet(); moveRelatedJournals(); rearrangeMostReadCitedPage(); accesibilityImageAltText(); removeDuplicateIds(); checkJournalHomeLinks(); if (typeof(Storage)!=='undefined' && sessionStorage.pbPreview==='On' && !inMicrositeScope()){ console.debug('Running document ready JS...'); docReady(); sessionStorage.pbPreview='Off'; } ///////////////////////////////////////////// $(window).bind('orientationchange', function(event){ try { $('input[name=AllField]').autocomplete('close'); } catch(e) {} }); $(window).scroll(function(){ let scroll = $(window).scrollTop(); try { if(scroll>1) $(‘input[name=AllField]’).autocomplete(‘close’); } catch(e) {} }); //console.debug(‘Journal: Food and Nutrition Bulletin, Issue: , Article: ‘); ]]>

Source

Leave a Reply