In default JA Comments plugin ( content ) we have these line code
if(!defined('JACOMMENT_GLOBAL_JS')){
JHTML::script(JURI::root().'components/com_jacomment/asset/js/jquery-1.4.2.js');
JHTML::script(JURI::root().'components/com_jacomment/asset/js/ja.comment.js');
JHTML::script(JURI::root().'components/com_jacomment/asset/js/ja.popup.js');
define('JACOMMENT_GLOBAL_JS', true);
}
By this way, it’s only load http://...
But in somecase your site loaded under ssl ( https ) and you will have warning because have link to non secured .
So this’s a patch.
$scheme = str_replace ('http','',JURI::root());
$scheme = str_replace ('https','',$scheme);
$uri =& JURI::getInstance();
$scheme = $uri->getScheme() . $scheme;
JHTML::script($scheme.'components/com_jacomment/asset/js/jquery-1.4.2.js');
JHTML::script($scheme.'components/com_jacomment/asset/js/ja.comment.js');
JHTML::script($scheme.'components/com_jacomment/asset/js/ja.popup.js');
at first we remove all kind of scheme and after that detect current scheme and add it back.
Actually in your site if you are going w/ optimize i suggest to put your own site url here. So don’t waste time for calc / checking …
A part of optimize .