1// $Id: easyModal.js 38633 2025-04-24 11:46:17Z brendon $ 2// Functions to support easyModal.js 3 4// override the defaults 5function easyModalOptions (onPageLoad) { 6 var defaultOptions = { 7 overlayOpacity: 0.7, 8 overlayColor: "#222", 9 hasVariableWidth: true, 10 updateZIndexOnOpen: false, 11 onOpen: function(myModal){ 12 $(".lean-overlay").css({'z-index' : '8885'}); 13 $(myModal).css({'z-index' : '8886'}); 14 // close the modal using the back button 15 if (viaPWA) { 16 if (typeof onPageLoad == 'undefined') { 17 easyModalAddHistoryEntry(myModal); 18 } 19 } 20 }, 21 onClose: function(myModal){ 22 if (viaPWA) { 23 if (typeof onPageLoad == 'undefined') { 24 easyModalHistoryPosition(); 25 } 26 } 27 } 28 }; 29 30 return defaultOptions; 31} 32 33// adds an entry to the browsers session history stack 34function easyModalAddHistoryEntry (myModal) { 35 var state = window.history.state; 36 var elementID = myModal.id; 37 // modify the browsers history stack 38 if (window.history.pushState) { 39 var updatedState = $.extend( {}, state, {modal: elementID, currPage: currPage} ); 40 window.history.pushState(updatedState, null, window.location.href); 41 } 42} 43 44// loads a specific page from the session history 45function easyModalHistoryPosition () { 46 var state = window.history.state; 47 // cause the browser to move back one page in the history 48 if (state != null) { 49 if (typeof state.modal != "undefined") { 50 // prevent auto scrolling on a find results page 51 onModalClose = true; 52 window.history.go(-1); 53 } 54 } 55}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.