Remove duplicated definition and move OC.msg to js/js.js

Fix issue #7166