fixed origin problem

replaced document.location.origin with "[ORIGIN_OF_MAIN_DOCUMENT]" to be replaced from editorProxy.js.
Note: this should stay "[ORIGIN_OF_MAIN_DOCUMENT]", it is not a placeholder, it is replaced automatically when loaded from editorProxy.js