From eedba602a516b14bc55acc42d07d3867abeb5cae Mon Sep 17 00:00:00 2001 From: Kohei Suzuki Date: Wed, 10 Jul 2013 12:07:25 +0900 Subject: Support Tombfix --- tombloo.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tombloo.js') diff --git a/tombloo.js b/tombloo.js index eee068b..f7d882c 100644 --- a/tombloo.js +++ b/tombloo.js @@ -103,12 +103,14 @@ commands.addUserCommand( // helper --- function getTombloo() { - const serviceId = '@brasil.to/tombloo-service;1'; + const serviceIds = ['@tombfix.github.io/tombfix-service;1', '@brasil.to/tombloo-service;1']; - if (!Cc[serviceId]) - throw new Error('Tombloo is not found. install from http://github.com/to/tombloo/wikis'); - - return Cc[serviceId].getService().wrappedJSObject; + for each (let serviceId in serviceIds) { + if (Cc[serviceId]) { + return Cc[serviceId].getService().wrappedJSObject; + } + } + throw new Error('Tombloo or Tombfix is not found. install from https://github.com/tombfix/core'); } function getContext() { -- cgit v1.2.3