Tiptoe around acceptsMultiple for the sake of Chrome 29 users.

This commit is contained in:
Thomas Wilburn 2013-11-11 13:31:41 -08:00
parent e4816f81f3
commit 0aaae789ce
3 changed files with 9 additions and 3 deletions

View file

@ -9,7 +9,13 @@ define([
var openFile = function() {
//have to call chooseEntry manually to support multiple files
chrome.fileSystem.chooseEntry({type: "openWritableFile", acceptsMultiple: true }, function(files) {
var args = {
type: "openWritableFile"
};
if (chrome.version >= 30) {
args.acceptsMultiple = true;
}
chrome.fileSystem.chooseEntry(args, function(files) {
//annoying array function test, since it's not apparently a real array
if (!files.slice) {
files = [ files ];

View file

@ -5,7 +5,7 @@ define(["command"], function(command) {
var project = {};
//put this here because Settings is pretty early in load process
chrome.version = window.navigator.appVersion.match(/Chrome\/(\d+)/)[1] || 0;
chrome.version = window.navigator.appVersion.match(/Chrome\/(\d+)/)[1] * 1 || 0;
var SyncFile = function(name, c) {
this.entry = {};

View file

@ -1,7 +1,7 @@
{
"name": "Caret",
"description": "Professional text editing for Chrome and Chrome OS",
"version": "1.2.3",
"version": "1.2.4",
"manifest_version": 2,
"icons": {
"128": "icon-128.png"