userscript/maril.user.js in maril-0.1.1 vs userscript/maril.user.js in maril-0.1.2

- old
+ new

@@ -1,9 +1,9 @@ // ==UserScript== // @name Maril // @namespace https://github.com/agate/maril -// @version 0.1.1 +// @version 0.1.2 // @description Marathon Application Run In Local // @author agate<agate.hao@gmail.com> // @match http://PUT.YOUR.MARATHON.DOMAIN.HERE/* // @grant GM_xmlhttpRequest // @grant GM_setClipboard @@ -22,20 +22,20 @@ onload: function(response) { let app = JSON.parse(response.responseText).app; let cmd = [ "docker run --rm -it" ]; for (var key in app.env) { - cmd.push(`-e ${key}=${app.env[key]}`); + cmd.push(`--env ${key}=${app.env[key]}`); } app.container.docker.parameters.forEach((parameter) => { cmd.push(`--${parameter.key} ${parameter.value}`); }); app.container.docker.portMappings.forEach((mapping) => { cmd.push(`-p ${mapping.containerPort}:${mapping.containerPort}`); }); cmd.push(app.container.docker.image); - GM_setClipboard(cmd.join(" ")); + GM_setClipboard(cmd.join(" \\\n")); alert("Already saved the docker run command into your clipboard."); }, onerror: (response) => { alert("error"); }