making all js files chrome extension compatible