From 053e48c3f4e5725b173eb41f86407ca85306b77a Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Mon, 1 Aug 2011 12:08:18 +0100 Subject: [PATCH] Secure the call of the costumStart function Author: Peter 'Pita' Martischka --- static/index.html | 2 +- static/js/pad2.js | 2 +- static/timeslider.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/static/index.html b/static/index.html index b7085458..1cc71bd9 100644 --- a/static/index.html +++ b/static/index.html @@ -125,6 +125,6 @@ } //start the costum js - if(costumStart) costumStart(); + if(typeof costumStart == "function") costumStart(); diff --git a/static/js/pad2.js b/static/js/pad2.js index aa1f7ccd..f442607d 100644 --- a/static/js/pad2.js +++ b/static/js/pad2.js @@ -30,7 +30,7 @@ $(document).ready(function() } //start the costum js - if(costumStart) costumStart(); + if(typeof costumStart == "function") costumStart(); handshake(); }); diff --git a/static/timeslider.html b/static/timeslider.html index fbcbc149..110b6d12 100644 --- a/static/timeslider.html +++ b/static/timeslider.html @@ -58,7 +58,7 @@ $(document).ready(function () { //start the costum js - if(costumStart) costumStart(); + if(typeof costumStart == "function") costumStart(); //get the padId out of the url var urlParts= document.location.pathname.split("/");