Blame SOURCES/0-inline-javascript-into-templates.patch

6f5b47
diff --git a/application/org.openjdk.jmc.flightrecorder.flameview/pom.xml b/application/org.openjdk.jmc.flightrecorder.flameview/pom.xml
6f5b47
index d363cba..5bc7c45 100644
6f5b47
--- a/application/org.openjdk.jmc.flightrecorder.flameview/pom.xml
6f5b47
+++ b/application/org.openjdk.jmc.flightrecorder.flameview/pom.xml
6f5b47
@@ -42,94 +42,4 @@
6f5b47
 	</parent>
6f5b47
 	<artifactId>org.openjdk.jmc.flightrecorder.flameview</artifactId>
6f5b47
 	<packaging>eclipse-plugin</packaging>
6f5b47
-
6f5b47
-	<properties>
6f5b47
-		<download.maven.plugin.version>1.6.7</download.maven.plugin.version>
6f5b47
-		<download-maven-plugin.phase>process-resources</download-maven-plugin.phase>
6f5b47
-		<download-maven-plugin.output>${project.basedir}/src/main/resources/jslibs</download-maven-plugin.output>
6f5b47
-		<spotless.config.path>${basedir}/../../configuration/ide/eclipse/formatting/formatting.xml</spotless.config.path>
6f5b47
-		<spotless.config.path.js>${basedir}/../../configuration/ide/eclipse/formatting/formattingjs.xml</spotless.config.path.js>
6f5b47
-	</properties>
6f5b47
-
6f5b47
-	<build>
6f5b47
-		<plugins>
6f5b47
-			<plugin>
6f5b47
-				<groupId>com.googlecode.maven-download-plugin</groupId>
6f5b47
-				<artifactId>download-maven-plugin</artifactId>
6f5b47
-				<version>${download.maven.plugin.version}</version>
6f5b47
-				<executions>
6f5b47
-					<execution>
6f5b47
-						<id>d3-flamegraph-css</id>
6f5b47
-						<phase>${download-maven-plugin.phase}</phase>
6f5b47
-						<goals>
6f5b47
-							<goal>wget</goal>
6f5b47
-						</goals>
6f5b47
-						<configuration>
6f5b47
-							<url>https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph.css</url>
6f5b47
-							<unpack>false</unpack>
6f5b47
-							<outputDirectory>${download-maven-plugin.output}</outputDirectory>
6f5b47
-						</configuration>
6f5b47
-					</execution>
6f5b47
-					<execution>
6f5b47
-						<id>d3-v6-js</id>
6f5b47
-						<phase>${download-maven-plugin.phase}</phase>
6f5b47
-						<goals>
6f5b47
-							<goal>wget</goal>
6f5b47
-						</goals>
6f5b47
-						<configuration>
6f5b47
-							<url>https://d3js.org/d3.v6.min.js</url>
6f5b47
-							<unpack>false</unpack>
6f5b47
-							<outputDirectory>${download-maven-plugin.output}</outputDirectory>
6f5b47
-						</configuration>
6f5b47
-					</execution>
6f5b47
-					<execution>
6f5b47
-						<id>d3-flamegraph-tooltip-js</id>
6f5b47
-						<phase>${download-maven-plugin.phase}</phase>
6f5b47
-						<goals>
6f5b47
-							<goal>wget</goal>
6f5b47
-						</goals>
6f5b47
-						<configuration>
6f5b47
-							<url>https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph-tooltip.js</url>
6f5b47
-							<unpack>false</unpack>
6f5b47
-							<outputDirectory>${download-maven-plugin.output}</outputDirectory>
6f5b47
-						</configuration>
6f5b47
-					</execution>
6f5b47
-					<execution>
6f5b47
-						<id>d3-flamegraph-js</id>
6f5b47
-						<phase>${download-maven-plugin.phase}</phase>
6f5b47
-						<goals>
6f5b47
-							<goal>wget</goal>
6f5b47
-						</goals>
6f5b47
-						<configuration>
6f5b47
-							<url>https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph.js</url>
6f5b47
-							<unpack>false</unpack>
6f5b47
-							<outputDirectory>${download-maven-plugin.output}</outputDirectory>
6f5b47
-						</configuration>
6f5b47
-					</execution>
6f5b47
-				</executions>
6f5b47
-			</plugin>
6f5b47
-			
6f5b47
-			<plugin>
6f5b47
-				<groupId>com.diffplug.spotless</groupId>
6f5b47
-				<artifactId>spotless-maven-plugin</artifactId>
6f5b47
-				<version>${spotless.version}</version>
6f5b47
-				<configuration>
6f5b47
-					<formats>
6f5b47
-						<format>
6f5b47
-							<includes>
6f5b47
-								<include>src/main/js/*.js</include>
6f5b47
-							</includes>
6f5b47
-							<eclipseWtp>
6f5b47
-								<type>JS</type>
6f5b47
-								<files>
6f5b47
-									<file>${spotless.config.path.js}</file>
6f5b47
-								</files>
6f5b47
-							</eclipseWtp>
6f5b47
-						</format>
6f5b47
-					</formats>
6f5b47
-				</configuration>
6f5b47
-			</plugin>
6f5b47
-			-->
6f5b47
-		</plugins>
6f5b47
-	</build>
6f5b47
 </project>
6f5b47
diff --git a/application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java b/application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java
6f5b47
index 93cc9a9..0e94a05 100644
6f5b47
--- a/application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java
6f5b47
+++ b/application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/views/FlameGraphView.java
6f5b47
@@ -61,7 +61,6 @@ import java.util.concurrent.Executors;
6f5b47
 import java.util.concurrent.ThreadFactory;
6f5b47
 import java.util.concurrent.atomic.AtomicInteger;
6f5b47
 import java.util.logging.Level;
6f5b47
-import java.util.stream.Collectors;
6f5b47
 import java.util.stream.Stream;
6f5b47
 
6f5b47
 import org.eclipse.jface.action.Action;
6f5b47
@@ -120,27 +119,17 @@ public class FlameGraphView extends ViewPart implements ISelectionListener {
6f5b47
 	private static final String TOOLTIP_DESCRIPTION = getFlameviewMessage(FLAMEVIEW_SELECT_HTML_TOOLTIP_DESCRIPTION);
6f5b47
 	private static final String HTML_PAGE;
6f5b47
 	static {
6f5b47
-		// from: https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph.css
6f5b47
-		String cssD3Flamegraph = "jslibs/d3-flamegraph.css";
6f5b47
-		// from: https://d3js.org/d3.v6.min.js
6f5b47
-		String jsD3V6 = "jslibs/d3.v6.min.js";
6f5b47
-		// from: https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph-tooltip.js
6f5b47
-		String jsD3Tip = "jslibs/d3-flamegraph-tooltip.js";
6f5b47
-		// from: https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph.js
6f5b47
-		String jsD3FlameGraph = "jslibs/d3-flamegraph.js";
6f5b47
-		// jmc flameview coloring, tooltip and other  functions
6f5b47
 		String jsFlameviewName = "flameview.js";
6f5b47
 		String cssFlameview = "flameview.css";
6f5b47
 
6f5b47
-		String jsD3 = loadLibraries(jsD3V6, jsD3FlameGraph, jsD3Tip);
6f5b47
-		String styleheets = loadLibraries(cssD3Flamegraph, cssFlameview);
6f5b47
+		String styleheets = fileContent(cssFlameview);
6f5b47
 		String jsFlameviewColoring = fileContent(jsFlameviewName);
6f5b47
 
6f5b47
 		String magnifierIcon = getIconBase64(ImageConstants.ICON_MAGNIFIER);
6f5b47
 
6f5b47
 		// formatter arguments for the template: %1 - CSSs stylesheets,
6f5b47
-		// %2 - Search Icon Base64, %3 - 3rd party scripts, %4 - Flameview Coloring,
6f5b47
-		HTML_PAGE = String.format(fileContent("page.template"), styleheets, magnifierIcon, jsD3, jsFlameviewColoring);
6f5b47
+		// %2 - Search Icon Base64, %3 - Flameview Coloring,
6f5b47
+		HTML_PAGE = String.format(fileContent("page.template"), styleheets, magnifierIcon, jsFlameviewColoring);
6f5b47
 	}
6f5b47
 
6f5b47
 	private static final int MODEL_EXECUTOR_THREADS_NUMBER = 3;
6f5b47
@@ -490,14 +479,6 @@ public class FlameGraphView extends ViewPart implements ISelectionListener {
6f5b47
 		}
6f5b47
 	}
6f5b47
 
6f5b47
-	private static String loadLibraries(String ... libs) {
6f5b47
-		if (libs == null || libs.length == 0) {
6f5b47
-			return "";
6f5b47
-		} else {
6f5b47
-			return Stream.of(libs).map(FlameGraphView::fileContent).collect(Collectors.joining("\n"));
6f5b47
-		}
6f5b47
-	}
6f5b47
-
6f5b47
 	private static String fileContent(String fileName) {
6f5b47
 		try {
6f5b47
 			return StringToolkit.readString(FlameGraphView.class.getClassLoader().getResourceAsStream(fileName));
6f5b47
diff --git a/application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template b/application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template
6f5b47
index 67bc3c7..4f0b21c 100644
6f5b47
--- a/application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template
6f5b47
+++ b/application/org.openjdk.jmc.flightrecorder.flameview/src/main/resources/page.template
6f5b47
@@ -3,6 +3,7 @@
6f5b47
 
6f5b47
 <head>
6f5b47
 	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
6f5b47
+	<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph.css"></link>
6f5b47
 	<style type="text/css">%1$s</style>
6f5b47
 	<style type="text/css" media="print">
6f5b47
 		body {
6f5b47
@@ -24,9 +25,9 @@
6f5b47
 	<script type="text/javascript">
6f5b47
 	%3$s
6f5b47
 	</script>
6f5b47
-	<script type="text/javascript">
6f5b47
-	%4$s
6f5b47
-	</script>
6f5b47
+	<script type="text/javascript" src="https://d3js.org/d3.v6.min.js"></script>
6f5b47
+	<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph.js"></script>
6f5b47
+	<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/d3-flame-graph@4.0.6/dist/d3-flamegraph-tooltip.js"></script>
6f5b47
 	<script type="text/javascript">
6f5b47
 		
6f5b47
 		const minSearchTextSize = 3;
6f5b47
diff --git a/application/org.openjdk.jmc.flightrecorder.graphview/pom.xml b/application/org.openjdk.jmc.flightrecorder.graphview/pom.xml
6f5b47
index 8fcb4f2..973677e 100644
6f5b47
--- a/application/org.openjdk.jmc.flightrecorder.graphview/pom.xml
6f5b47
+++ b/application/org.openjdk.jmc.flightrecorder.graphview/pom.xml
6f5b47
@@ -42,80 +42,4 @@
6f5b47
 	</parent>
6f5b47
 	<artifactId>org.openjdk.jmc.flightrecorder.graphview</artifactId>
6f5b47
 	<packaging>eclipse-plugin</packaging>
6f5b47
-
6f5b47
-	<properties>
6f5b47
-		<download.maven.plugin.version>1.6.7</download.maven.plugin.version>
6f5b47
-		<download-maven-plugin.phase>process-resources</download-maven-plugin.phase>
6f5b47
-		<download-maven-plugin.output>${project.basedir}/src/main/resources/jslibs</download-maven-plugin.output>
6f5b47
-		<spotless.config.path>${basedir}/../../configuration/ide/eclipse/formatting/formatting.xml</spotless.config.path>
6f5b47
-		<spotless.config.path.js>${basedir}/../../configuration/ide/eclipse/formatting/formattingjs.xml</spotless.config.path.js>
6f5b47
-	</properties>
6f5b47
-
6f5b47
-	<build>
6f5b47
-		<plugins>
6f5b47
-			<plugin>
6f5b47
-				<groupId>com.googlecode.maven-download-plugin</groupId>
6f5b47
-				<artifactId>download-maven-plugin</artifactId>
6f5b47
-				<version>${download.maven.plugin.version}</version>
6f5b47
-				<executions>
6f5b47
-					<execution>
6f5b47
-						<id>download-d3</id>
6f5b47
-						<phase>${download-maven-plugin.phase}</phase>
6f5b47
-						<goals>
6f5b47
-							<goal>wget</goal>
6f5b47
-						</goals>
6f5b47
-						<configuration>
6f5b47
-							<url>https://d3js.org/d3.v6.min.js</url>
6f5b47
-							<unpack>false</unpack>
6f5b47
-							<outputDirectory>${download-maven-plugin.output}</outputDirectory>
6f5b47
-							<skipCache>true</skipCache>
6f5b47
-							<overwrite>true</overwrite>
6f5b47
-						</configuration>
6f5b47
-					</execution>
6f5b47
-					<execution>
6f5b47
-						<id>download-wasm</id>
6f5b47
-						<phase>${download-maven-plugin.phase}</phase>
6f5b47
-						<goals>
6f5b47
-							<goal>wget</goal>
6f5b47
-						</goals>
6f5b47
-						<configuration>
6f5b47
-							<url>https://unpkg.com/@hpcc-js/wasm@0.3.14/dist/index.js</url>
6f5b47
-							<unpack>false</unpack>
6f5b47
-							<outputDirectory>${download-maven-plugin.output}</outputDirectory>
6f5b47
-							<skipCache>true</skipCache>
6f5b47
-							<overwrite>true</overwrite>
6f5b47
-						</configuration>
6f5b47
-					</execution>
6f5b47
-					<execution>
6f5b47
-						<id>download-graphviz</id>
6f5b47
-						<phase>${download-maven-plugin.phase}</phase>
6f5b47
-						<goals>
6f5b47
-							<goal>wget</goal>
6f5b47
-						</goals>
6f5b47
-						<configuration>
6f5b47
-							<url>https://unpkg.com/d3-graphviz@3.1.0/build/d3-graphviz.js</url>
6f5b47
-							<unpack>false</unpack>
6f5b47
-							<outputDirectory>${download-maven-plugin.output}</outputDirectory>
6f5b47
-							<skipCache>true</skipCache>
6f5b47
-							<overwrite>true</overwrite>
6f5b47
-						</configuration>
6f5b47
-					</execution>
6f5b47
-					<execution>
6f5b47
-						<id>download-graphvizlib-wasm</id>
6f5b47
-						<phase>${download-maven-plugin.phase}</phase>
6f5b47
-						<goals>
6f5b47
-							<goal>wget</goal>
6f5b47
-						</goals>
6f5b47
-						<configuration>
6f5b47
-							<url>https://unpkg.com/@hpcc-js/wasm@0.3.14/dist/graphvizlib.wasm</url>
6f5b47
-							<unpack>false</unpack>
6f5b47
-							<outputDirectory>${download-maven-plugin.output}</outputDirectory>
6f5b47
-							<skipCache>true</skipCache>
6f5b47
-							<overwrite>true</overwrite>
6f5b47
-						</configuration>
6f5b47
-					</execution>
6f5b47
-				</executions>
6f5b47
-			</plugin>
6f5b47
-		</plugins>
6f5b47
-	</build>
6f5b47
 </project>
6f5b47
diff --git a/application/org.openjdk.jmc.flightrecorder.graphview/src/main/java/org/openjdk/jmc/flightrecorder/graphview/views/GraphView.java b/application/org.openjdk.jmc.flightrecorder.graphview/src/main/java/org/openjdk/jmc/flightrecorder/graphview/views/GraphView.java
6f5b47
index 536b690..f30a2c1 100644
6f5b47
--- a/application/org.openjdk.jmc.flightrecorder.graphview/src/main/java/org/openjdk/jmc/flightrecorder/graphview/views/GraphView.java
6f5b47
+++ b/application/org.openjdk.jmc.flightrecorder.graphview/src/main/java/org/openjdk/jmc/flightrecorder/graphview/views/GraphView.java
6f5b47
@@ -86,18 +86,7 @@ import org.openjdk.jmc.ui.misc.DisplayToolkit;
6f5b47
 public class GraphView extends ViewPart implements ISelectionListener {
6f5b47
 	private static final String HTML_PAGE;
6f5b47
 	static {
6f5b47
-		String jsD3 = "jslibs/d3.v6.min.js";
6f5b47
-		String jsGraphviz = "jslibs/index.js";
6f5b47
-		String wasmGraphviz = "jslibs/graphvizlib.wasm";
6f5b47
-		String jsGraphizD3 = "jslibs/d3-graphviz.js";
6f5b47
-
6f5b47
-		String wasmBase64 = loadBase64FromFile(wasmGraphviz);
6f5b47
-
6f5b47
-		HTML_PAGE = String.format(loadStringFromFile("page.template"), loadLibraries(jsD3),
6f5b47
-				// we inline base64 wasm in the library code to avoid fetching it at runtime
6f5b47
-				loadStringFromFile(jsGraphviz, "wasmBinaryFile=\"graphvizlib.wasm\";",
6f5b47
-						"wasmBinaryFile=dataURIPrefix + '" + wasmBase64 + "';"),
6f5b47
-				loadLibraries(jsGraphizD3));
6f5b47
+		HTML_PAGE = String.format(loadStringFromFile("page.template"));
6f5b47
 	}
6f5b47
 
6f5b47
 	private enum ModelState {
6f5b47
diff --git a/application/org.openjdk.jmc.flightrecorder.graphview/src/main/resources/page.template b/application/org.openjdk.jmc.flightrecorder.graphview/src/main/resources/page.template
6f5b47
index eb7423a..c362f0c 100644
6f5b47
--- a/application/org.openjdk.jmc.flightrecorder.graphview/src/main/resources/page.template
6f5b47
+++ b/application/org.openjdk.jmc.flightrecorder.graphview/src/main/resources/page.template
6f5b47
@@ -3,9 +3,10 @@
6f5b47
 
6f5b47
 <head>
6f5b47
 	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
6f5b47
-	<script>%1$s</script>
6f5b47
-	<script>%2$s</script>
6f5b47
-	<script>%3$s</script>
6f5b47
+	<script type="text/javascript" src="https://d3js.org/d3.v6.min.js"></script>
6f5b47
+    <script type="text/javascript" src="https://unpkg.com/@hpcc-js/wasm@0.3.14/dist/index.js"></script>
6f5b47
+    <script type="text/javascript" src="https://unpkg.com/d3-graphviz@3.1.0/build/d3-graphviz.js"></script>
6f5b47
+    <script type="text/javascript" src="https://unpkg.com/@hpcc-js/wasm@0.3.14/dist/graphvizlib.wasm"></script>
6f5b47
 </head>
6f5b47
 
6f5b47
 <body>
6f5b47
diff --git a/application/org.openjdk.jmc.flightrecorder.heatmap/pom.xml b/application/org.openjdk.jmc.flightrecorder.heatmap/pom.xml
6f5b47
index 138ba7f..4f7fe35 100644
6f5b47
--- a/application/org.openjdk.jmc.flightrecorder.heatmap/pom.xml
6f5b47
+++ b/application/org.openjdk.jmc.flightrecorder.heatmap/pom.xml
6f5b47
@@ -42,38 +42,4 @@
6f5b47
 	</parent>
6f5b47
 	<artifactId>org.openjdk.jmc.flightrecorder.heatmap</artifactId>
6f5b47
 	<packaging>eclipse-plugin</packaging>
6f5b47
-
6f5b47
-	<properties>
6f5b47
-		<download.maven.plugin.version>1.4.2</download.maven.plugin.version>
6f5b47
-		<download-maven-plugin.phase>process-resources</download-maven-plugin.phase>
6f5b47
-		<download-maven-plugin.output>${project.basedir}/src/main/resources/jslibs</download-maven-plugin.output>
6f5b47
-		<spotless.config.path>${basedir}/../../configuration/ide/eclipse/formatting/formatting.xml</spotless.config.path>
6f5b47
-		<spotless.config.path.js>${basedir}/../../configuration/ide/eclipse/formatting/formattingjs.xml</spotless.config.path.js>
6f5b47
-	</properties>
6f5b47
-
6f5b47
-	<build>
6f5b47
-		<plugins>
6f5b47
-			<plugin>
6f5b47
-				<groupId>com.googlecode.maven-download-plugin</groupId>
6f5b47
-				<artifactId>download-maven-plugin</artifactId>
6f5b47
-				<version>${download.maven.plugin.version}</version>
6f5b47
-				<executions>
6f5b47
-					<execution>
6f5b47
-						<id>d3-v6-js</id>
6f5b47
-						<phase>${download-maven-plugin.phase}</phase>
6f5b47
-						<goals>
6f5b47
-							<goal>wget</goal>
6f5b47
-						</goals>
6f5b47
-						<configuration>
6f5b47
-							<url>https://d3js.org/d3.v6.min.js</url>
6f5b47
-							<unpack>false</unpack>
6f5b47
-							<outputDirectory>${download-maven-plugin.output}</outputDirectory>
6f5b47
-							<skipCache>true</skipCache>
6f5b47
-							<overwrite>true</overwrite>
6f5b47
-						</configuration>
6f5b47
-					</execution>
6f5b47
-				</executions>
6f5b47
-			</plugin>
6f5b47
-		</plugins>
6f5b47
-	</build>
6f5b47
 </project>
6f5b47
diff --git a/application/org.openjdk.jmc.flightrecorder.heatmap/src/main/java/org/openjdk/jmc/flightrecorder/heatmap/views/HeatmapView.java b/application/org.openjdk.jmc.flightrecorder.heatmap/src/main/java/org/openjdk/jmc/flightrecorder/heatmap/views/HeatmapView.java
6f5b47
index 96c19fc..7be0487 100644
6f5b47
--- a/application/org.openjdk.jmc.flightrecorder.heatmap/src/main/java/org/openjdk/jmc/flightrecorder/heatmap/views/HeatmapView.java
6f5b47
+++ b/application/org.openjdk.jmc.flightrecorder.heatmap/src/main/java/org/openjdk/jmc/flightrecorder/heatmap/views/HeatmapView.java
6f5b47
@@ -72,9 +72,7 @@ import org.openjdk.jmc.ui.misc.DisplayToolkit;
6f5b47
 public class HeatmapView extends ViewPart implements ISelectionListener {
6f5b47
 	private static final String HTML_PAGE;
6f5b47
 	static {
6f5b47
-		String jsD3V6 = "jslibs/d3.v6.min.js";
6f5b47
-		HTML_PAGE = String.format(loadStringFromFile("page.template"), loadLibraries(jsD3V6),
6f5b47
-				loadStringFromFile("heatmap.js"));
6f5b47
+		HTML_PAGE = String.format(loadStringFromFile("page.template"), loadStringFromFile("heatmap.js"));
6f5b47
 	}
6f5b47
 
6f5b47
 	private enum ModelState {
6f5b47
diff --git a/application/org.openjdk.jmc.flightrecorder.heatmap/src/main/resources/page.template b/application/org.openjdk.jmc.flightrecorder.heatmap/src/main/resources/page.template
6f5b47
index d6f4c5a..9a13f40 100644
6f5b47
--- a/application/org.openjdk.jmc.flightrecorder.heatmap/src/main/resources/page.template
6f5b47
+++ b/application/org.openjdk.jmc.flightrecorder.heatmap/src/main/resources/page.template
6f5b47
@@ -2,15 +2,13 @@
6f5b47
 <html xmlns="http://www.w3.org/1999/xhtml">
6f5b47
   <head>
6f5b47
     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6f5b47
-    <script>
6f5b47
-      %1$s
6f5b47
-    </script>
6f5b47
+    <script type="text/javascript" src="https://d3js.org/d3.v6.min.js"></script>
6f5b47
   </head>
6f5b47
 
6f5b47
   <body>
6f5b47
     
6f5b47
     <script type="text/javascript">
6f5b47
-      %2$s
6f5b47
+      %1$s
6f5b47
     </script>
6f5b47
   </body>
6f5b47
 </html>