prefetch()

This function will not prefetch resources for users on 2G connections or if the "Save Data" option is enabled. Read More »

postMessage()

This function is essentially an alias for , but it also checks if Service Worker is supported and if there is currently a controller, so it is safe to use anywhere. Remember: Using shift+reload bypasses the service worker so the window will not be controlled! This prevents messages from being posted! Read More »

nebula_sw_message

This is useful for syncing data/information between tabs without needing localstorage. Like closing a notification in one tab closes it in all tabs, or incrementing a counter on all tabs (like an ecommerce cart). Note: the message is not sent to the same tab/window (client) that triggered it. This event will trigger anytime the service Read More »

lazyLoadHTML()

For elements, you can use the function (or ). For elements, you can use the function (or ). For all other HTML elements, use the . For background images, add the class to the element. Warning: The HTML (, , etc.) methods support non-JavaScript environments, but the  method requires JavaScript to work. To trigger the Read More »

crmFormRealTime()

"Use Companion Script" and "Real-Time Form Identification" options must be enabled for this to work in Nebula Options (using the Companion plugin). Use the same input classes as such as or . Read More »

getYoutubeTitle()

This checks if the undocumented function is available from the Youtube API. Either way it tries to return the most applicable title available. The fallback stack is Youtube title, iframe title attribute, or video ID. Read More »

getYoutubeID()

This checks if the undocumented function is available from the Youtube API. Either way it tries to return the most applicable ID available. The fallback stack is Youtube ID, Debug ID, ?v parameter from the video URL or the iframe src, ID attribute of the iframe element itself. Read More »

networkAvailable()

This function will add a body class of "offline" when the network is unavailable (and remove it when the network connection returns). It is also called automatically when the network availability changes using the JavaScript events and . Read More »