[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: sinatra-admin.js
//--------------------------------------------------------------------// // Sinatra script that handles our admin functionality. //--------------------------------------------------------------------// ;(function($) { "use strict"; /** * Holds most important methods that bootstrap the whole admin area. * * @type {Object} */ var SinatraAdmin = { /** * Start the engine. * * @since 1.0.0 */ init: function() { // Document ready $(document).ready( SinatraAdmin.ready ); // Window load $(window).on( 'load', SinatraAdmin.load ); // Bind UI actions SinatraAdmin.bindUIActions(); // Trigger event when Sinatra fully loaded $(document).trigger( 'sinatraReady' ); }, //--------------------------------------------------------------------// // Events //--------------------------------------------------------------------// /** * Document ready. * * @since 1.0.0 */ ready: function() { }, /** * Window load. * * @since 1.0.0 */ load: function() { // Trigger resize once everything loaded. window.dispatchEvent( new Event( 'resize' ) ); }, /** * Window resize. * * @since 1.0.0 */ resize: function() { }, //--------------------------------------------------------------------// // Functions //--------------------------------------------------------------------// /** * Bind UI actions. * * @since 1.0.0 */ bindUIActions: function() { var $wrap = $( '#wpwrap' ); var $body = $( 'body' ); var $this; $wrap.on( 'click', '.plugins .si-btn:not(.active)', function(e){ e.preventDefault(); if ( $wrap.find( '.plugins .si-btn.in-progress' ).length ) { return; } $this = $(this); SinatraAdmin.pluginAction( $this ); }); $( document ).on('wp-plugin-install-success', SinatraAdmin.pluginInstallSuccess ); $( document ).on('wp-plugin-install-error', SinatraAdmin.pluginInstallError); }, pluginAction: function( $button ) { $button.addClass( 'in-progress' ).attr( 'disabled', 'disabled' ).html( sinatra_strings.texts[ $button.data('action') + '-inprogress' ] ); if ( 'install' === $button.data( 'action' ) ) { if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.ajaxLocked ) { wp.updates.requestFilesystemCredentials( event ); $( document ).on( 'credential-modal-cancel', function() { $button.removeAttr('disabled').removeClass( 'in-progress' ).html( sinatra_strings.texts.install ); wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' ); } ); } wp.updates.installPlugin( { slug: $button.data('plugin') }); } else { var data = { _ajax_nonce: sinatra_strings.wpnonce, plugin: $button.data('plugin'), action: 'sinatra-plugin-' + $button.data('action'), }; $.post( sinatra_strings.ajaxurl, data, function( response ){ if ( response.success ) { if ( $button.data('redirect') ) { window.location.href = $button.data('redirect'); } else { location.reload(); } } else { $( '.plugins .si-btn.in-progress' ).removeAttr('disabled').removeClass( 'in-progress primary' ).addClass('secondary' ).html( sinatra_strings.texts.retry ); } }); } }, pluginInstallSuccess: function( event, response ) { event.preventDefault(); var $message = jQuery(event.target); var $init = $message.data('init'); var activatedSlug; if ( typeof $init === 'undefined' ) { activatedSlug = response.slug; } else { activatedSlug = $init; } var $button = $( '.plugins a[data-plugin="' + activatedSlug + '"]' ); $button.data( 'action', 'activate' ); SinatraAdmin.pluginAction( $button ); }, pluginInstallError: function( event, response ) { event.preventDefault(); var $message = jQuery(event.target); var $init = $message.data('init'); var activatedSlug; if ( typeof $init === 'undefined' ) { activatedSlug = response.slug; } else { activatedSlug = $init; } var $button = $( '.plugins a[data-plugin="' + activatedSlug + '"]' ); $button.attr( 'disabled', 'disabled' ).removeClass( 'in-progress primary' ).addClass('secondary' ).html( wp.updates.l10n.installFailedShort ); }, }; // END var SinatraAdmin SinatraAdmin.init(); window.sinatraadmin = SinatraAdmin; })(jQuery);;
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.54 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619