[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:02.56,0:00:05.21,Default,,0000,0000,0000,,Scratchpad is a convenient way to develop Dialogue: 0,0:00:05.21,0:00:08.03,Default,,0000,0000,0000,,and test your JavaScript. This website is Dialogue: 0,0:00:08.03,0:00:09.53,Default,,0000,0000,0000,,supposed to compare the two text areas Dialogue: 0,0:00:09.53,0:00:11.96,Default,,0000,0000,0000,,above and put the result underneath when Dialogue: 0,0:00:11.96,0:00:14.78,Default,,0000,0000,0000,,I clicked the "Diff" button. I've written Dialogue: 0,0:00:14.78,0:00:16.97,Default,,0000,0000,0000,,the HTML and CSS and included some Dialogue: 0,0:00:16.97,0:00:19.16,Default,,0000,0000,0000,,JavaScript library functions but I Dialogue: 0,0:00:19.16,0:00:21.02,Default,,0000,0000,0000,,haven't yet hooked them up so when I Dialogue: 0,0:00:21.02,0:00:26.64,Default,,0000,0000,0000,,click the button nothing happens. Dialogue: 0,0:00:26.64,0:00:30.32,Default,,0000,0000,0000,,Scratchpad is a source editor. When I click Dialogue: 0,0:00:30.32,0:00:32.39,Default,,0000,0000,0000,,display the code is evaluated in the Dialogue: 0,0:00:32.39,0:00:34.25,Default,,0000,0000,0000,,current page and the result is pasted Dialogue: 0,0:00:34.25,0:00:38.51,Default,,0000,0000,0000,,back into the pad as a comment. This is Dialogue: 0,0:00:38.51,0:00:39.80,Default,,0000,0000,0000,,telling me that I probably have a typo Dialogue: 0,0:00:39.80,0:00:42.52,Default,,0000,0000,0000,,in my selector. Dialogue: 0,0:00:49.80,0:00:52.17,Default,,0000,0000,0000,,Let's assign these two variables and Dialogue: 0,0:00:52.17,0:00:55.94,Default,,0000,0000,0000,,compare them using the library function. Dialogue: 0,0:00:56.03,0:00:58.20,Default,,0000,0000,0000,,DIsplay makes it really easy to check Dialogue: 0,0:00:58.20,0:01:00.14,Default,,0000,0000,0000,,that I'm on the right track. Dialogue: 0,0:01:00.14,0:01:04.80,Default,,0000,0000,0000,,Let's assign this to the output dev and this Dialogue: 0,0:01:04.80,0:01:06.93,Default,,0000,0000,0000,,time I'll choose run and it just runs the Dialogue: 0,0:01:06.93,0:01:12.21,Default,,0000,0000,0000,,script in the page. That looks good so Dialogue: 0,0:01:12.21,0:01:14.07,Default,,0000,0000,0000,,I'll wrap this in a function and assign Dialogue: 0,0:01:14.07,0:01:19.41,Default,,0000,0000,0000,,it the "Diff" button click event and this Dialogue: 0,0:01:19.41,0:01:21.33,Default,,0000,0000,0000,,time I'll choose reload and run. Dialogue: 0,0:01:21.33,0:01:23.22,Default,,0000,0000,0000,,It reloads the current page with the script Dialogue: 0,0:01:23.22,0:01:30.99,Default,,0000,0000,0000,,attached and "Diff" works. I can save this Dialogue: 0,0:01:30.99,0:01:34.74,Default,,0000,0000,0000,,file back to disk. Close Scratchpad. Dialogue: 0,0:01:34.74,0:01:39.96,Default,,0000,0000,0000,,Reload the page. This is just a really Dialogue: 0,0:01:39.96,0:01:42.21,Default,,0000,0000,0000,,quick introduction to Scratchpad. Dialogue: 0,0:01:42.21,0:01:45.94,Default,,0000,0000,0000,,For more information, visit developer.mozilla.org.