From 7c42bcb97ef7951798276dd1ac18d1abd78e9d28 Mon Sep 17 00:00:00 2001 From: Michael Herzberg Date: Sun, 17 May 2015 12:58:09 +0200 Subject: [PATCH] Uncluttered checkForExtraText. --- DVHMA-Featherweight/www/js/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/DVHMA-Featherweight/www/js/index.js b/DVHMA-Featherweight/www/js/index.js index 13e5e82..b3a5e81 100644 --- a/DVHMA-Featherweight/www/js/index.js +++ b/DVHMA-Featherweight/www/js/index.js @@ -24,10 +24,16 @@ function checkForExtraText() { window.plugins.webintent.hasExtra(window.plugins.webintent.EXTRA_SUBJECT, function(hasSubjectExtra) { if (hasSubjectExtra) { window.plugins.webintent.getExtra(window.plugins.webintent.EXTRA_SUBJECT, function(title) { - window.todo.create([{"title" : title, "content" : content}], reloadItems, console.log); + var param = {}; + param.title = title; + param.content = content; + window.todo.create([param], reloadItems, console.log); }, console.log); } else { - window.todo.create([{"title" : "NewTitle", "content" : content}], reloadItems, console.log); + var param = {}; + param.title = "NewTitle"; + param.content = content; + window.todo.create([param], reloadItems, console.log); } }, console.log); }, console.log);