summaryrefslogtreecommitdiffstats
path: root/site/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'site/functions.php')
-rw-r--r--site/functions.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/site/functions.php b/site/functions.php
index fb023b9..b90a35e 100644
--- a/site/functions.php
+++ b/site/functions.php
@@ -18,7 +18,21 @@
*/
/* Functions */
-
+
+ /* Minified HTML output (note: needs work for <pre> tags) */
+ function miniHtml($strHtml) {
+ return $strHtml = preg_replace(
+ array('/(\s)+/s', '/\>[^\S ]+/s', '/[^\S ]+\</s'),
+ array('\\1', '>', '<'),
+ $strHtml
+ );
+ }
+
+ /* Minified CSS output */
+ function miniCss($strCss) {
+ return preg_replace("/\r|\n/", "", $strCss);
+ }
+
/* Generic function for showing a list of URLs */
function mirrorList($arrayMirrors,$strNotFoundMessage,$forIndexStart,$forIndexbelow) {