aboutsummaryrefslogtreecommitdiff
path: root/plugin/markdown
diff options
context:
space:
mode:
authorSergey Gospodarets <shospodarets@spotware.com>2014-04-02 12:59:36 +0300
committerSergey Gospodarets <shospodarets@spotware.com>2014-04-02 12:59:36 +0300
commit75247a88606b1ab2e2158fe476fbe53340dc4934 (patch)
tree060557e010f156e27bbc458d5255af01f85ee5cd /plugin/markdown
parent9da952fea30906090446d038430186b11dba7f13 (diff)
downloadfreenode-live-2017-presentation-75247a88606b1ab2e2158fe476fbe53340dc4934.tar
freenode-live-2017-presentation-75247a88606b1ab2e2158fe476fbe53340dc4934.tar.gz
Mark xhr.status=0 as successful
Diffstat (limited to 'plugin/markdown')
-rwxr-xr-xplugin/markdown/markdown.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js
index 19aea28..efec14e 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' ),