Dear friends,
I guess its very important from server perspective to combine js files into ONE.js file and move header inline scripts to this ONE.js.
Currently, I point CDN path for qa-content/jquery-1.11.3.min.js file. So, I dont need to deal with this anymore. However, I have only two js files in home-page: qa-page.js and snow-core.js (just ignore other pages). Can I just copy paste all codes from qa-page.js into snow-core.js (I will use only snowflat theme). And where to remove call for qa-page.js?
More importantly, I have two inline scripts in head and one inline script in body. Two scripts in head are: (<script>var eventnotifyAjaxURL = "./eventnotify"</script>) and (<script>var qa_root = '.\/'; var qa_request = 'hot';</script>)
This eventnotify comes from On-Site Notification plugin. Code is like this:
if(qa_opt('q2apro_onsitenotifications_enabled') && qa_is_logged_in()) {
$this->output('<script type="text/javascript">
var eventnotifyAjaxURL = "'.qa_path('eventnotify').'";
</script>');
One inline script in body is:
<script>var b=document.getElementsByTagName('body')[0];b.className=b.className.replace('qa-body-js-off', 'qa-body-js-on');</script>
My question is how to move all these inline scripts both in head and body into snow-core.js ? Is it possible? Will the site work properly? Please guide how to do it.