From 5ecaef74ac91241f31e108b12d3fee78e72d5057 Mon Sep 17 00:00:00 2001 From: Zach Wise Date: Tue, 12 Feb 2013 13:05:35 -0600 Subject: [PATCH] Escape `.`-character for proper matching of jsonp files thanks to @gunnarlium d051fc17ff21a5bbe40721d580da92c2ec6524af --- compiled/js/timeline.js | 2 +- source/js/VMM.Timeline.DataObj.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiled/js/timeline.js b/compiled/js/timeline.js index d642c9d..9e9ca05 100644 --- a/compiled/js/timeline.js +++ b/compiled/js/timeline.js @@ -9119,7 +9119,7 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef trace("DATA SOURCE: STORIFY"); VMM.Timeline.DataObj.model.storify.getData(raw_data); //http://api.storify.com/v1/stories/number10gov/g8-and-nato-chicago-summit - } else if (raw_data.match(".jsonp")) { + } else if (raw_data.match("\.jsonp")) { trace("DATA SOURCE: JSONP"); LoadLib.js(raw_data, VMM.Timeline.DataObj.onJSONPLoaded); } else { diff --git a/source/js/VMM.Timeline.DataObj.js b/source/js/VMM.Timeline.DataObj.js index 618c6be..a2731b1 100644 --- a/source/js/VMM.Timeline.DataObj.js +++ b/source/js/VMM.Timeline.DataObj.js @@ -22,7 +22,7 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef trace("DATA SOURCE: STORIFY"); VMM.Timeline.DataObj.model.storify.getData(raw_data); //http://api.storify.com/v1/stories/number10gov/g8-and-nato-chicago-summit - } else if (raw_data.match(".jsonp")) { + } else if (raw_data.match("\.jsonp")) { trace("DATA SOURCE: JSONP"); LoadLib.js(raw_data, VMM.Timeline.DataObj.onJSONPLoaded); } else {