From 75247a88606b1ab2e2158fe476fbe53340dc4934 Mon Sep 17 00:00:00 2001 From: Sergey Gospodarets Date: Wed, 2 Apr 2014 12:59:36 +0300 Subject: [PATCH 1/2] Mark xhr.status=0 as successful --- plugin/markdown/markdown.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js index 19aea287..efec14e1 100755 --- a/plugin/markdown/markdown.js +++ b/plugin/markdown/markdown.js @@ -219,7 +219,10 @@ xhr.onreadystatechange = function() { if( xhr.readyState === 4 ) { - if ( xhr.status >= 200 && xhr.status < 300 ) { + if ( + (xhr.status >= 200 && xhr.status < 300) || + xhr.status === 0 // file protocol yields status code 0 (useful for local debug, mobile applications etc.) + ) { section.outerHTML = slidify( xhr.responseText, { separator: section.getAttribute( 'data-separator' ), From 873f2dbc96e712d1afbc2f197c8b60287d7f728c Mon Sep 17 00:00:00 2001 From: Sergey Gospodarets Date: Wed, 2 Apr 2014 13:02:39 +0300 Subject: [PATCH 2/2] Mark xhr.status=0 as successful --- plugin/markdown/markdown.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js index efec14e1..6c27a138 100755 --- a/plugin/markdown/markdown.js +++ b/plugin/markdown/markdown.js @@ -220,9 +220,9 @@ xhr.onreadystatechange = function() { if( xhr.readyState === 4 ) { if ( - (xhr.status >= 200 && xhr.status < 300) || - xhr.status === 0 // file protocol yields status code 0 (useful for local debug, mobile applications etc.) - ) { + (xhr.status >= 200 && xhr.status < 300) || + xhr.status === 0 // file protocol yields status code 0 (useful for local debug, mobile applications etc.) + ) { section.outerHTML = slidify( xhr.responseText, { separator: section.getAttribute( 'data-separator' ),