From 8c89feac3e7f1763797f2159fbf64d3b5f255efe Mon Sep 17 00:00:00 2001 From: Kristoffer Walker Date: Mon, 28 Jun 2010 05:01:37 +0800 Subject: [PATCH] Support chrome: and resource: location protocols. XMLHttpRequest tried to load `chrome:` and `resource:` protocols as if they were not local. Change isFileProtocol flag to accurately represent them. --- lib/less/browser.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/less/browser.js b/lib/less/browser.js index 2ad71ff..579d1e1 100644 --- a/lib/less/browser.js +++ b/lib/less/browser.js @@ -2,7 +2,9 @@ // browser.js - client-side engine // -var isFileProtocol = location.protocol === 'file:'; +var isFileProtocol = (location.protocol === 'file:' || + location.protocol === 'chrome:' || + location.protocol === 'resource:'); less.env = location.hostname == '127.0.0.1' || location.hostname == '0.0.0.0' ||