From 0c057d29bf84a3b9c0147088b45aa8af40866a80 Mon Sep 17 00:00:00 2001
From: Markus Amalthea Magnuson
Date: Mon, 15 Apr 2013 10:56:56 +0200
Subject: [PATCH 1/8] Shorten HTML comment to avoid scrollbars.
---
page/javascript-101/running-code.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/page/javascript-101/running-code.md b/page/javascript-101/running-code.md
index 5346a951..d0c71fdc 100644
--- a/page/javascript-101/running-code.md
+++ b/page/javascript-101/running-code.md
@@ -11,7 +11,7 @@ attribution:
The first and recommended option is to write code in an external file (with a `.js` extension), which can then be included on our web page using an HTML `
```
### Inline
From 30b2e2bed8d027bb96d26d05cfd8bd1ce869f146 Mon Sep 17 00:00:00 2001
From: Markus Amalthea Magnuson
Date: Mon, 15 Apr 2013 10:58:53 +0200
Subject: [PATCH 2/8] Don't indent inside
```
From bca5e8751db8bd652327534f4341557a229aef18 Mon Sep 17 00:00:00 2001
From: Markus Amalthea Magnuson
Date: Mon, 15 Apr 2013 10:59:04 +0200
Subject: [PATCH 3/8] Space inside parentheses.
---
page/javascript-101/running-code.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/page/javascript-101/running-code.md b/page/javascript-101/running-code.md
index 2b9a1d6b..129ab26b 100644
--- a/page/javascript-101/running-code.md
+++ b/page/javascript-101/running-code.md
@@ -31,8 +31,8 @@ The last option is to use the event handler attributes of HTML elements. This me
```
-Click Me!
-Click Me Too!
+Click Me!
+Click Me Too!
```
### Placement
From 77e1e55f10da9192aebdbb5b27597d4fda745357 Mon Sep 17 00:00:00 2001
From: Markus Amalthea Magnuson
Date: Mon, 15 Apr 2013 10:59:27 +0200
Subject: [PATCH 4/8] "hello-world" -> `hello-world
---
page/javascript-101/running-code.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/page/javascript-101/running-code.md b/page/javascript-101/running-code.md
index 129ab26b..17a13e13 100644
--- a/page/javascript-101/running-code.md
+++ b/page/javascript-101/running-code.md
@@ -37,7 +37,7 @@ The last option is to use the event handler attributes of HTML elements. This me
### Placement
-Placement of the previous two options is important and can vary depending on the situation. If you are including JavaScript that doesn't access the elements on the page, you can safely place the script before the closing HTML `` tag. However, if the code will interact with the elements on the page, you have to make sure those elements exist at the time the script is executed. This common pitfall can be seen in the example below. The script for finding the element with the ID "hello-world" will be executed before the element is defined in the document.
+Placement of the previous two options is important and can vary depending on the situation. If you are including JavaScript that doesn't access the elements on the page, you can safely place the script before the closing HTML `` tag. However, if the code will interact with the elements on the page, you have to make sure those elements exist at the time the script is executed. This common pitfall can be seen in the example below. The script for finding the element with the ID `hello-world` will be executed before the element is defined in the document.
```
From f54956c88a745b7c6fa40ca627cc56732f8bf28d Mon Sep 17 00:00:00 2001
From: Markus Amalthea Magnuson
Date: Mon, 15 Apr 2013 10:59:47 +0200
Subject: [PATCH 5/8] Move comment to JavaScript block.
---
page/javascript-101/running-code.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/page/javascript-101/running-code.md b/page/javascript-101/running-code.md
index 17a13e13..df32ed89 100644
--- a/page/javascript-101/running-code.md
+++ b/page/javascript-101/running-code.md
@@ -40,11 +40,11 @@ The last option is to use the event handler attributes of HTML elements. This me
Placement of the previous two options is important and can vary depending on the situation. If you are including JavaScript that doesn't access the elements on the page, you can safely place the script before the closing HTML `` tag. However, if the code will interact with the elements on the page, you have to make sure those elements exist at the time the script is executed. This common pitfall can be seen in the example below. The script for finding the element with the ID `hello-world` will be executed before the element is defined in the document.
```
-
From 96e778188c5e8bf04710f791f8dad6eddf4c88c4 Mon Sep 17 00:00:00 2001
From: Markus Amalthea Magnuson
Date: Mon, 15 Apr 2013 11:00:00 +0200
Subject: [PATCH 6/8] No indentation inside
---
page/javascript-101/running-code.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/page/javascript-101/running-code.md b/page/javascript-101/running-code.md
index df32ed89..7f72d310 100644
--- a/page/javascript-101/running-code.md
+++ b/page/javascript-101/running-code.md
@@ -50,7 +50,9 @@ Placement of the previous two options is important and can vary depending on the
- Hello World
+
+Hello World
+
```
From e8cb4f55f2479e7d29bda7d71013fecb69997544 Mon Sep 17 00:00:00 2001
From: Markus Amalthea Magnuson
Date: Mon, 15 Apr 2013 11:00:13 +0200
Subject: [PATCH 7/8] End on colon.
---
page/javascript-101/running-code.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/page/javascript-101/running-code.md b/page/javascript-101/running-code.md
index 7f72d310..24106efc 100644
--- a/page/javascript-101/running-code.md
+++ b/page/javascript-101/running-code.md
@@ -57,7 +57,7 @@ Placement of the previous two options is important and can vary depending on the
```
-It is a common pattern to move scripts to the bottom of the page, prior to the closing HTML `` tag. This will guarantee that elements are defined when the script is executed.
+It is a common pattern to move scripts to the bottom of the page, prior to the closing HTML `` tag. This will guarantee that elements are defined when the script is executed:
```
From 3ac29960b68dbaff0facd458be74c0108bdd801e Mon Sep 17 00:00:00 2001
From: Markus Amalthea Magnuson
Date: Mon, 15 Apr 2013 11:00:36 +0200
Subject: [PATCH 8/8] Move comment to JavaScript block, and no indentation
inside
---
page/javascript-101/running-code.md | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/page/javascript-101/running-code.md b/page/javascript-101/running-code.md
index 24106efc..be54e2bd 100644
--- a/page/javascript-101/running-code.md
+++ b/page/javascript-101/running-code.md
@@ -60,18 +60,18 @@ Placement of the previous two options is important and can vary depending on the
It is a common pattern to move scripts to the bottom of the page, prior to the closing HTML `` tag. This will guarantee that elements are defined when the script is executed:
```
-
-
-
-
+
- Hello World
-
+
+Hello World
+
+
```