From c6a43087c6d334633ee45db8f4b0516cf2f201e3 Mon Sep 17 00:00:00 2001 From: akless Date: Sun, 26 Jan 2020 13:33:54 +0100 Subject: [PATCH] absolute path --- multi_blank/ccm.multi_blank.js | 2 +- multi_blank/ccm.multi_blank.min.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 multi_blank/ccm.multi_blank.min.js diff --git a/multi_blank/ccm.multi_blank.js b/multi_blank/ccm.multi_blank.js index 19a429c1..b4a92eaf 100644 --- a/multi_blank/ccm.multi_blank.js +++ b/multi_blank/ccm.multi_blank.js @@ -13,7 +13,7 @@ ccm: 'https://ccmjs.github.io/ccm/ccm.js', config: { - component_obj: [ "ccm.component", "../blank/ccm.blank.js" ], + component_obj: [ "ccm.component", "https://ccmjs.github.io/akless-components/blank/ccm.blank.js" ], times: 3 }, diff --git a/multi_blank/ccm.multi_blank.min.js b/multi_blank/ccm.multi_blank.min.js new file mode 100644 index 00000000..5180adaf --- /dev/null +++ b/multi_blank/ccm.multi_blank.min.js @@ -0,0 +1 @@ +(()=>{const component={name:"multi_blank",ccm:"https://ccmjs.github.io/ccm/ccm.js",config:{component_obj:["ccm.component","https://ccmjs.github.io/akless-components/blank/ccm.blank.js"],times:3},Instance:function(){this.start=(async()=>{this.element.innerHTML="";for(let i=1;i<=this.times;i++)this.element.appendChild((await this.component_obj.start()).root)})}};let b="ccm."+component.name+(component.version?"-"+component.version.join("."):"")+".js";if(window.ccm&&null===window.ccm.files[b])return window.ccm.files[b]=component;(b=window.ccm&&window.ccm.components[component.name])&&b.ccm&&(component.ccm=b.ccm);"string"===typeof component.ccm&&(component.ccm={url:component.ccm});let c=(component.ccm.url.match(/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)/)||["latest"])[0];if(window.ccm&&window.ccm[c])window.ccm[c].component(component);else{var a=document.createElement("script");document.head.appendChild(a);component.ccm.integrity&&a.setAttribute("integrity",component.ccm.integrity);component.ccm.crossorigin&&a.setAttribute("crossorigin",component.ccm.crossorigin);a.onload=function(){window.ccm[c].component(component);document.head.removeChild(a)};a.src=component.ccm.url}})(); \ No newline at end of file