Tenger Plugin: optimize javascript