[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.146.152.203: ~ $
/* global MilestoneConfig */

var Milestone = ( function () {
	// eslint-disable-next-line no-shadow
	var Milestone = function ( args ) {
		var widget_content = document.getElementById( args.content_id ),
			id = args.id,
			refresh = args.refresh * 1000;

		this.timer = function () {
			var instance = this;
			var xhr = new XMLHttpRequest();

			xhr.onload = function () {
				var response = JSON.parse( xhr.responseText ),
					httpCheck = xhr.status >= 200 && xhr.status < 300,
					responseCheck =
						'undefined' !== typeof response.message && 'undefined' !== typeof response.refresh;

				if ( httpCheck && responseCheck ) {
					var countdownElement = widget_content.querySelector( '.milestone-countdown' );

					countdownElement.outerHTML = response.message;
					refresh = response.refresh * 1000;

					if ( ! refresh ) {
						return;
					}

					setTimeout( function () {
						instance.timer();
					}, refresh );
				}
			};

			xhr.open( 'GET', MilestoneConfig.api_root + 'jetpack/v4/widgets/' + id );
			xhr.send();
		};

		if ( refresh > 0 ) {
			this.timer();
		}
	};
	return function ( args ) {
		return new Milestone( args );
	};
} )();

( function () {
	var i,
		MilestoneInstances = {};

	if ( typeof MilestoneConfig === 'undefined' ) {
		return;
	}

	for ( i = 0; i < MilestoneConfig.instances.length; i++ ) {
		MilestoneInstances[ i ] = new Milestone( MilestoneConfig.instances[ i ] );
	}
} )();

Filemanager

Name Type Size Permission Actions
admin.js File 748 B 0644
class-milestone-widget.php File 23.8 KB 0644
milestone-widget.css File 824 B 0644
milestone.js File 1.39 KB 0644
milestone.php File 358 B 0644
style-admin.css File 1.39 KB 0644