the javascript for GM