Welcome to WordPress. This is your first post. Edit or delete it, then start writing!
/* global FusionPageBuilderApp, fusionBuilderGetContent, fusionBuilderText, fusionHistoryState */ /* eslint no-native-reassign: 0 */ /* eslint no-global-assign: 0 */ /* * Adds undo and redo functionality to the Fusion Page Builder */ ( function( $ ) { var fusionHistoryManager = {}, fusionCommands = new Array( '[]' ), fusionCommandsStates = new Array( '[]' ), // History states maxSteps = 25, // Maximum steps allowed/saved currStep = 0; // Current Index of step // Is tracking on or off? window.tracking = 'on'; // History state title window.fusionHistoryState = ''; window.fusionHistoryManager = fusionHistoryManager; /** * Get editor data and add to array * @param NULL * @return NULL */ fusionHistoryManager.captureEditor = function( ) { var allElements; if ( fusionHistoryManager.isTrackingOn() ) { // If reached limit. if ( currStep == maxSteps ) { // jshint ignore:line fusionCommands.shift(); // Remove first index } else { currStep += 1; // Else increment index } if ( 1 < currStep ) { $( '.fusion-builder-history-list li' ).removeClass( 'fusion-history-active-state' ); $( '.fusion-builder-history-list' ).prepend( '
Just another WordPress site
Welcome to WordPress. This is your first post. Edit or delete it, then start writing!