SAMYANG/m/asset/js/sy.m.plugin.js
/**
         * Detecting any change on the URL to scroll to the given anchor link
         * (a way to detect back history button as we play with the hashes on the URL)
         */
Detecting any change on the URL to scroll to the given anchor link
(a way to detect back history button as we play with the hashes on the URL)
Detecting any change on the URL to scroll to the given anchor link ( a way to detect back history button as we play with the hashes on the URL )
function hashChangeHandler() {
            if (!isScrolling && !options.lockAnchors) {
                var anchors = getAnchorsURL();
                var sectionAnchor = anchors.section;
                var slideAnchor = anchors.slide;
                var isFirstSlideMove = (typeof lastScrolledDestiny === 'undefined');
                var isFirstScrollMove = (typeof lastScrolledDestiny === 'undefined' && typeof slideAnchor === 'undefined' && !slideMoving);
                if (sectionAnchor && sectionAnchor.length) {
                    if ((sectionAnchor && sectionAnchor !== lastScrolledDestiny) && !isFirstSlideMove
                        || isFirstScrollMove
                        || (!slideMoving && lastScrolledSlide != slideAnchor)) {
                        scrollPageAndSlide(sectionAnchor, slideAnchor);
                    }
                }
            }
        }
function hashChangeHandler ( ) { if ( ! isScrolling && ! options . lockAnchors ) { var anchors = getAnchorsURL ( ) ; var sectionAnchor = anchors . section ; var slideAnchor = anchors . slide ; var isFirstSlideMove = ( typeof lastScrolledDestiny === 'undefined' ) ; var isFirstScrollMove = ( typeof lastScrolledDestiny === 'undefined' && typeof slideAnchor === 'undefined' && ! slideMoving ) ; if ( sectionAnchor && sectionAnchor . length ) { if ( ( sectionAnchor && sectionAnchor !== lastScrolledDestiny ) && ! isFirstSlideMove || isFirstScrollMove || ( ! slideMoving && lastScrolledSlide != slideAnchor ) ) { scrollPageAndSlide ( sectionAnchor , slideAnchor ) ; } } } }
Detecting any change on the URL to scroll to the given anchor link
 (a way to detect back history button as we play with the hashes on the URL)
Detecting any change on the URL to scroll to the given anchor link ( a way to detect back history button as we play with the hashes on the URL )
//when moving to a slide in the first section for the first time (first time to add an anchor to the URL) /*in order to call scrollpage() only once for each destination at a time
                    It is called twice for each scroll otherwise, as in case of using anchorlinks `hashChange`
                    event is fired on every scroll too.*/