dash_chirashi = { url : "https://chirashi.alohaworks.jp/", raw_element_id : 0, settings : {}, create_id : function () { return 'id_' + new String(Math.random()).split('.').join(''); }, setup : function (hash) { this.settings = hash; }, add_script : function (src) { var s = document.createElement('script'), h = document.getElementsByTagName('head'), i = this.create_id(); s.setAttribute('id', i); s.setAttribute('src', src); h[0].appendChild(s); }, setup : function (settings) { this.settings = settings; }, get_raw : function (element_id) { this.raw_element_id = element_id; this.add_script(this.url + 'api/raw/' + this.settings.cny); }, receive_raw : function (data) { document.getElementById(this.raw_element_id).innerHTML = data } }