You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/07/13 15:42:54 UTC

[GitHub] [beam] alexeyinkin commented on a diff in pull request #22235: [Website] add scroll to new position if anchor is present in Firefox

alexeyinkin commented on code in PR #22235:
URL: https://github.com/apache/beam/pull/22235#discussion_r920234411


##########
website/www/site/assets/js/language-switch-v2.js:
##########
@@ -25,6 +25,15 @@ function setScrollToNewPosition(clickedElementData) {
     $('html, body').scrollTop(elCurrentHeight - elPreviousOffsetFromViewPort);
 }
 
+function isFirefox() {
+    const userAgent = navigator.userAgent;
+    return userAgent.match(/firefox|fxios/i);
+}

Review Comment:
   Functions that are now global in this file can be defined inside of `$(document).ready(function() {...` so as not to clutter the global namespace.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org