Explorar el Código

add contentUrl to utils

weichen hace 4 años
padre
commit
23869db9f9
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      backstage/static/js/utils.js

+ 4 - 0
backstage/static/js/utils.js

@@ -23,4 +23,8 @@ function removeDescElement(p, textArea, inputButton, removeButton) {
 
 function removeDescData(blockArray, blockIndex, dataIndex) {
   blockArray[blockIndex].data.splice(dataIndex, 1);
+}
+
+const contentUrl = () => {
+  return 'http://localhost:1313' + (JSON.parse(document.getElementById('url').textContent)).url + '/';
 }