added js auto function load feature