Skip to content

Commit

Permalink
Add configuration option for plugin minification
Browse files Browse the repository at this point in the history
  • Loading branch information
stickz committed Oct 18, 2024
1 parent 85756b6 commit 61ee100
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions conf/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
$cachedPluginLoading = false; // Set to true to enable rapid cached loading of ruTorrent plugins
// Required to clear web browser cache when upgrading versions

$pluginMinification = true; // Stable change to reduce loading times by minimizing JavaScript networked
// Only recommended to disable when required for debuging purposes

$localhosts = array( // list of local interfaces
"127.0.0.1",
"localhost",
Expand Down
9 changes: 8 additions & 1 deletion php/getplugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,4 +554,11 @@ function testRemoteRequests($remoteRequests)

global $cachedPluginLoading;
$cacheResults=(isset($cachedPluginLoading) && $cachedPluginLoading);
CachedEcho::send(Minifier::minify($jResult),"application/javascript",$cacheResults);

global $pluginMinification;
if (isset($pluginMinification) && $pluginMinification)
{
$jResult = Minifier::minify($jResult);
}

CachedEcho::send($jResult,"application/javascript",$cacheResults);

0 comments on commit 61ee100

Please sign in to comment.