summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dependencies.js10
-rw-r--r--filenames.php (renamed from getFilename.php)0
-rw-r--r--index.html14
3 files changed, 14 insertions, 10 deletions
diff --git a/dependencies.js b/dependencies.js
index c7ba39a..028a8e5 100644
--- a/dependencies.js
+++ b/dependencies.js
@@ -3,14 +3,16 @@ $.getScript('math.js');
$.ajax({
type: "POST",
- // Invoke getFilename.php
- url: "getFilename.php",
+ // Invoke filenames.php
+ url: "filenames.php",
// Receive the resultant filenames from the php script in JSON format
dataType: "json",
- // add url for the required folder
- data:{ url: "/data_structures_correct/"},
+ // Add url for the required folder
+ data: {
+ url: "/data_structures_correct/"
+ },
success: function (data) {
/*
diff --git a/getFilename.php b/filenames.php
index 3355ac3..3355ac3 100644
--- a/getFilename.php
+++ b/filenames.php
diff --git a/index.html b/index.html
index c870056..e0f5180 100644
--- a/index.html
+++ b/index.html
@@ -2144,19 +2144,21 @@
<script type="text/javascript">
// Preload all images
- var dir = ["/blocks/", "/images/", "/palettes/"];
- for(addr in dir) {
+ var directory = ["/blocks/", "/images/", "/palettes/"];
+ for(folder in directory) {
$.ajax({
type: "POST",
- // Invoke getFilename.php
- url: "getFilename.php",
+ // Invoke filenames.php
+ url: "filenames.php",
// Receive the resultant filenames from the php script in JSON format
dataType: "json",
- // add url for the required folder
- data:{ url: dir[addr] },
+ // Add url for the required folder
+ data: {
+ url: directory[folder]
+ },
success: function (data) {
function preload(sources) {