# notificationx/3.3.3/vendor/wpdeveloper/lib-utility/scripts/udx.spa.js

NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner &amp; Floating Notification Bar, version 3.3.3. 1 lines.

- Page: https://pluginprobe.com/plugins/notificationx/3.3.3/code/vendor/wpdeveloper/lib-utility/scripts/udx.spa.js
- Raw: https://pluginprobe.com/plugins/notificationx/3.3.3/raw/vendor/wpdeveloper/lib-utility/scripts/udx.spa.js
- Modified: 2024-05-21T07:46:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/notificationx/3.3.3/code/vendor/wpdeveloper/lib-utility/scripts/udx.spa.js#L10-L20`.

```javascript
define("udx.spa",["module","require","exports","knockout","knockout.mapping","knockout.localStorage","pace","udx.utility","udx.utility.imagesloaded"],function(a,b){function c(a){if(Object.extend(a||{},{name:void 0,debug:void 0,api:window.location.href+"api",bodyClass:"spa-enabled"}),a.node||(a.node=document.body),"function"!=typeof a.node.getAttribute)return console.error("udx.spa","Target not specifed."),this;a.node.getAttribute("data-version"),a.node.getAttribute("data-ajax"),a.node.getAttribute("data-home"),a.node.getAttribute("data-debug")||!1;return this}console.debug("udx.spa","spaReady");{var d=b("pace");b("knockout"),b("knockout.mapping"),b("udx.utility"),b("udx.utility.imagesloaded")}return d.options={document:!0,ajax:!0,eventLag:!1,restartOnPushState:!0,restartOnRequestAfter:!0},d.start(),Object.defineProperties(c.prototype,{configure:{value:function(){},enumerable:!0,configurable:!0,writable:!0},ViewModel:{value:function(){console.debug("udx.spa","ViewModel");var a=this;return a.schedules=b("knockout").observableArray([]),a.processes=b("knockout").observableArray([]),a.state=b("knockout").observableArray([]),"function"==typeof jQuery&&jQuery("li.menu-item > a").click(c.bindNavigation),this},enumerable:!0,configurable:!0,writable:!0},bindNavigation:{value:function(a){return a.preventDefault(),a.target.pathname&&"/"!==a.target.pathname?void jQuery("main").load(a.target.href+" main"):null},enumerable:!0,configurable:!0,writable:!0},applyBindings:{value:function(){},enumerable:!0,configurable:!0,writable:!0}}),Object.defineProperties(c,{create:{value:function(a){return this instanceof Node&&this.parentElement&&(console.log("SPA is instance of Node"),a=a||{}),new c(a||{})},enumerable:!0,configurable:!0,writable:!0}}),c});
```
