1/* Source and licensing information for the line(s) below can be found at https://www.ntccthailand.org/core/misc/drupal.init.js. */ 2// Allow other JavaScript libraries to use $. 3if (window.jQuery) { 4 jQuery.noConflict(); 5} 6 7// Class indicating that JS is enabled; used for styling purpose. 8document.documentElement.className += ' js'; 9 10// JavaScript should be made compatible with libraries other than jQuery by 11// wrapping it in an anonymous closure. 12(function (Drupal, drupalSettings) { 13 /** 14 * Calls callback when document ready. 15 * 16 * @param {function} callback 17 * The function to be called on document ready. 18 */ 19 const domReady = (callback) => { 20 const listener = () => { 21 callback(); 22 document.removeEventListener('DOMContentLoaded', listener); 23 }; 24 if (document.readyState !== 'loading') { 25 setTimeout(callback, 0); 26 } else { 27 document.addEventListener('DOMContentLoaded', listener); 28 } 29 }; 30 31 // Attach all behaviors. 32 domReady(() => { 33 Drupal.attachBehaviors(document, drupalSettings); 34 }); 35})(Drupal, window.drupalSettings); 36 37/* Source and licensing information for the above line(s) can be found at https://www.ntccthailand.org/core/misc/drupal.init.js. */
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.