support additional parameters in integration pipe

(these are not urgent, and i don't actually plan on using them at the present, but they might be a good idea)
This commit is contained in:
Simon Kornblith 2010-06-24 09:54:46 +00:00
parent 8e7d467ddf
commit afd758f509

View file

@ -123,9 +123,9 @@ Zotero.Integration = new function() {
fifoStream.readLine(line);
fifoStream.close();
var spaceIndex = line.value.indexOf(" ");
var agent = line.value.substr(0, spaceIndex);
var cmd = line.value.substr(spaceIndex+1);
var parts = line.value.split(" ");
var agent = parts[0];
var cmd = parts[1];
if(agent == "Zotero" && cmd == "shutdown") return;
main.dispatch(new mainThread(agent, cmd), background.DISPATCH_NORMAL);
}