Files
roi-theme/wp-content/plugins/thrive-ab-page-testing/assets/js/main.js
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

33 lines
694 B
JavaScript
Executable File

(function ( $ ) {
//DOM ready
$( function () {
var ThriveAB = window.ThriveAB || {},
util = require( './util' ),
router = require( './router' );
_.extendOwn( ThriveAB.ajax, util.ajax );
Backbone.emulateHTTP = true;
ThriveAB.router = new router();
Backbone.history.stop();
Backbone.history.start();
if ( ! Backbone.history.fragment ) {
if ( ThriveAB.current_test ) {
return ThriveAB.router.navigate( '#test', {trigger: true} );
}
if ( ThriveAB.running_test ) {
ThriveAB.router.navigate( '#test/' + ThriveAB.running_test.id, {trigger: true} );
} else {
ThriveAB.router.navigate( '#dashboard', {trigger: true} );
}
}
} );
})( jQuery );