Fix for Google Chrome(Chromium), so you can use less in extensions, apps. Adds protocol support but you have to use .json as file extension for css file, otherwise you get "Uncaught Error: NETWORK_ERR: XMLHttpRequest Exception 101".

This commit is contained in:
Janez Troha
2011-02-01 09:49:51 -08:00
parent 0d95755e00
commit dc5a08014c

View File

@@ -4,6 +4,7 @@
var isFileProtocol = (location.protocol === 'file:' ||
location.protocol === 'chrome:' ||
location.protocol === 'chrome-extension:' ||
location.protocol === 'resource:');
less.env = less.env || (location.hostname == '127.0.0.1' ||