Software: Apache. PHP/8.3.27 uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364) Safe-mode: OFF (not secure) /usr/share/nodejs/turbolinks/src/turbolinks/ drwxr-xr-x | |
| Viewing file: Select action/file-type: // Generated by CoffeeScript 1.12.8
(function() {
var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
require('./http_request');
require('./progress_bar');
Turbolinks.BrowserAdapter = (function() {
var NETWORK_FAILURE, TIMEOUT_FAILURE, ref;
ref = Turbolinks.HttpRequest, NETWORK_FAILURE = ref.NETWORK_FAILURE, TIMEOUT_FAILURE = ref.TIMEOUT_FAILURE;
function BrowserAdapter(controller) {
this.controller = controller;
this.showProgressBar = bind(this.showProgressBar, this);
this.progressBar = new Turbolinks.ProgressBar;
}
BrowserAdapter.prototype.visitProposedToLocationWithAction = function(location, action) {
return this.controller.startVisitToLocationWithAction(location, action);
};
BrowserAdapter.prototype.visitStarted = function(visit) {
visit.issueRequest();
visit.changeHistory();
return visit.loadCachedSnapshot();
};
BrowserAdapter.prototype.visitRequestStarted = function(visit) {
this.progressBar.setValue(0);
if (visit.hasCachedSnapshot() || visit.action !== "restore") {
return this.showProgressBarAfterDelay();
} else {
return this.showProgressBar();
}
};
BrowserAdapter.prototype.visitRequestProgressed = function(visit) {
return this.progressBar.setValue(visit.progress);
};
BrowserAdapter.prototype.visitRequestCompleted = function(visit) {
return visit.loadResponse();
};
BrowserAdapter.prototype.visitRequestFailedWithStatusCode = function(visit, statusCode) {
switch (statusCode) {
case NETWORK_FAILURE:
case TIMEOUT_FAILURE:
return this.reload();
default:
return visit.loadResponse();
}
};
BrowserAdapter.prototype.visitRequestFinished = function(visit) {
return this.hideProgressBar();
};
BrowserAdapter.prototype.visitCompleted = function(visit) {
return visit.followRedirect();
};
BrowserAdapter.prototype.pageInvalidated = function() {
return this.reload();
};
BrowserAdapter.prototype.showProgressBarAfterDelay = function() {
return this.progressBarTimeout = setTimeout(this.showProgressBar, this.controller.progressBarDelay);
};
BrowserAdapter.prototype.showProgressBar = function() {
return this.progressBar.show();
};
BrowserAdapter.prototype.hideProgressBar = function() {
this.progressBar.hide();
return clearTimeout(this.progressBarTimeout);
};
BrowserAdapter.prototype.reload = function() {
return window.location.reload();
};
return BrowserAdapter;
})();
}).call(this);
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0111 ]-- |