Loading jQuery without using it is stupid. Add options for it.
This commit is contained in:
Danang Probo Sayekti 2014-02-15 02:10:47 +07:00
commit 2f86b2780d
2 changed files with 10 additions and 1 deletions

View file

@ -68,6 +68,9 @@ rss.char = ""
img.thumbnail = "true"
default.thumbnail = ""
;Enable or disable jQuery, if Lightbox is "on" then this option ignored.
jquery = "disable"
; Lightbox inline image handling. This can slowdown your page load, especially when Disqus enabled. "on" or "off".
lightbox = "off"

View file

@ -1398,6 +1398,7 @@ function authorinfo($title=null, $body=null) {
function head_contents($title, $description, $canonical) {
$styleImage = config('lightbox');
$jq = config('jquery');
$output = '';
$title = '<title>' . $title . '</title>';
@ -1419,7 +1420,12 @@ function head_contents($title, $description, $canonical) {
$output .= $title ."\n". $favicon ."\n". $charset ."\n". $generator ."\n". $xua ."\n". $viewport ."\n". $description ."\n". $sitemap ."\n". $canonical ."\n". $feed ."\n". $lightboxcss ."\n". $jquery ."\n". $lightbox ."\n" .$corejs ."\n";
}
else {
$output .= $title ."\n". $favicon ."\n". $charset ."\n". $generator ."\n". $xua ."\n". $viewport ."\n". $description ."\n". $sitemap ."\n". $canonical ."\n". $feed ."\n". $jquery ."\n";
if($jq == 'enable') {
$output .= $title ."\n". $favicon ."\n". $charset ."\n". $generator ."\n". $xua ."\n". $viewport ."\n". $description ."\n". $sitemap ."\n". $canonical ."\n". $feed ."\n". $jquery ."\n";
}
else {
$output .= $title ."\n". $favicon ."\n". $charset ."\n". $generator ."\n". $xua ."\n". $viewport ."\n". $description ."\n". $sitemap ."\n";
}
}
return $output;