mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Issue #5192 - Javascript defer option. (experimental)
This commit is contained in:
20
e107_web/js/core/settings.jquery.php
Normal file
20
e107_web/js/core/settings.jquery.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
$_E107['minimal'] = true;
|
||||
require_once("../../../class2.php");
|
||||
ob_start();
|
||||
ob_implicit_flush(0);
|
||||
header("last-modified: " . gmdate("D, d M Y H:i:s",mktime(0,0,0,15,2,2004)) . " GMT");
|
||||
header('Content-type: text/javascript');
|
||||
|
||||
$tp = e107::getParser();
|
||||
$json = $tp->toJSON(e107::getJs()->getSettings());
|
||||
|
||||
$js = '$(document).ready(function() {';
|
||||
$js .= "var e107 = e107 || {'settings': {}, 'behaviors': {}};\n";
|
||||
$js .= "jQuery.extend(e107.settings, " . $json . ");\n";
|
||||
$js .= '});';
|
||||
|
||||
header ('ETag: "' . md5($js).'"' );
|
||||
echo $js;
|
||||
echo_gzipped_page();
|
Reference in New Issue
Block a user