{"action":"created","comment":{"url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/comments/37542479","id":37542479,"diff_hunk":"@@ -8,297 +12,354 @@ const clearInterval = require(\"sdk/timers\").clearInterval;\n const ADDON_ID = \"jid0-ziK34XHkBWB9ezxd4l9Q1yC7RP0@jetpack\";\n const DEFAULT_REFRESH_RATE = 60;\n const DEFAULT_FONT_SIZE = 14;\n-const DEFAULT_TICKER_SPACING = 2;\n-var Widget = require(\"sdk/widget\").Widget;\n-var Preferences = require('sdk/simple-prefs');\n-var prefs = Cc[\"@mozilla.org/preferences-service;1\"].getService(Ci.nsIPrefService).getBranch(\"extensions.ADDON_ID.\");\n+\n+var Preferences = require(\"sdk/simple-prefs\");\n+var prefs = Cc[\"@mozilla.org/preferences-service;1\"].getService(Ci.nsIPrefService).\n+            getBranch(\"extensions.ADDON_ID.\");\n var Request = require(\"sdk/request\").Request;\n-var self = require(\"sdk/self\");\n-var data = self.data;\n var tabs = require(\"sdk/tabs\");\n \n-var tickers = new Array(); // Store all tickers here\n-// Initialize tickers container\n-tickers['BitStampUSD'] = null;\n-tickers['BTCeUSD'] = null;\n-tickers['KrakenUSD'] = null;\n-tickers['CoinDeskUSD'] = null;\n-tickers['CoinbaseUSD'] = null;\n-tickers['CampBXUSD'] = null;\n-tickers['BitPayUSD'] = null;\n-tickers['TheRockTradingUSD'] = null;\n-tickers['BitFinexUSD'] = null;\n-tickers['BTCeEUR'] = null;\n-tickers['KrakenEUR'] = null;\n-tickers['CoinDeskEUR'] = null;\n-tickers['BitPayEUR'] = null;\n-tickers['BitonicEUR'] = null;\n-tickers['Bitcoin-CentralEUR'] = null;\n-tickers['TheRockTradingEUR'] = null;\n-tickers['CoinDeskGBP'] = null;\n-tickers['LocalbitcoinsGBP'] = null;\n-tickers['BittyliciousGBP'] = null;\n-tickers['BitPayGBP'] = null;\n-tickers['BitcurexPLN'] = null;\n-tickers['CaVirTexCAD'] = null;\n-tickers['BTCChinaCNY'] = null;\n-tickers['MercadoBitcoinBRL'] = null;\n-tickers['BTCTurkTRY'] = null;\n-tickers['BitcoinVenezuelaVEF'] = null;\n-tickers['LocalbitcoinsVEF'] = null;\n-tickers['CoinbaseVEF'] = null;\n-tickers['BitcoinVenezuelaARS'] = null;\n-tickers['LocalbitcoinsARS'] = null;\n-tickers['CoinbaseARS'] = null;\n-tickers['BitexARS'] = null;\n-tickers['LocalbitcoinsCLP'] = null;\n-tickers['BitsoMXN'] = null;\n-tickers['BitXZAR'] = null;\n-tickers['CoinbaseZAR'] = null;\n-tickers['Bit2CILS'] = null;\n-tickers['BTCeLitecoin'] = null;\n-tickers['KrakenLitecoin'] = null;\n-tickers['VircurexLitecoin'] = null;\n-tickers['BTCeLitecoinUSD'] = null;\n-tickers['BTCeLitecoinEUR'] = null;\n-tickers['VircurexWorldcoin'] = null;\n-tickers['CryptsyDogecoin'] = null;\n-tickers['KrakenDogecoin'] = null;\n-tickers['BTCeNamecoinUSD'] = null;\n-tickers['CryptsyAuroracoin'] = null;\n-tickers['CryptsyBlackcoin'] = null;\n-tickers['CryptsyNxt'] = null;\n-tickers['PoloniexNxt'] = null;\n-tickers['PoloniexBitshares'] = null;\n-tickers['KrakenRipple'] = null;\n-tickers['PoloniexMaidsafe'] = null;\n-tickers['PoloniexBitcoindark'] = null;\n-tickers['PoloniexMonero'] = null;\n-tickers['CryptsyDashBTC'] = null;\n-tickers['CryptsyDashUSD'] = null;\n-tickers['BitFinexDashBTC'] = null;\n-tickers['BitFinexDashUSD'] = null;\n-tickers['PoloniexBurst'] = null;\n-const MAX_TICKERS = Object.keys(tickers).length;\n-const DEBUG = false\n-var ticker_creators = new Array(); // Store all tickers creators here\n-var ordered_tickers = new Array();\n-var last_ticker_position = 0;\n+var orderedTickers = [];\n+var tickers = {}; // Store all tickers here\n \n exports.main = function() {\n \n-  var getBackgroundColor = function(id) {\n-    var low_id = id.toLowerCase();\n-    var other_bg_cryptos = [ 'dogecoin', 'worldcoin', 'namecoin', 'auroracoin', 'blackcoin', 'nxt',\n-      'bitshares', 'ripple', 'maidsafe', 'bitcoindark', 'monero', 'dash', 'burst' ];\n-    for (var i in other_bg_cryptos) {\n-      if (low_id.indexOf(other_bg_cryptos[i]) != -1) {  // Alt-coin\n+  function getPreference(prefName, type) {\n+    if (typeof Preferences.prefs[prefName] == \"undefined\") {\n+      if (DEBUG) {\n+        console.log(\"bitcoin-price-ticker addon error: \" + prefName + \" preference is not defined\");\n+      }\n+      switch (type) {\n+        case \"boolean\":\n+          return false;\n+        case \"integer\":\n+          return -1;\n+        case \"string\":\n+          return \"\";\n+        default:\n+          return null;\n+      }\n+    }\n+    return Preferences.prefs[prefName];\n+  }\n+\n+  function getBooleanPreference(prefName) {\n+    return getPreference(prefName, \"boolean\");\n+  }\n+\n+  function getIntegerPreference(prefName) {\n+    return getPreference(prefName, \"integer\");\n+  }\n+\n+  function getStringPreference(prefName) {\n+    return getPreference(prefName, \"string\");\n+  }\n+\n+  function getBackgroundColor(id) {\n+    var lowId = id.toLowerCase();\n+    var otherBgCryptos = [ \"dogecoin\", \"worldcoin\", \"namecoin\", \"auroracoin\", \"blackcoin\", \"nxt\",\n+      \"bitshares\", \"ripple\", \"maidsafe\", \"bitcoindark\", \"monero\", \"dash\", \"burst\" ];\n+    for (var i in otherBgCryptos) {\n+      if (lowId.indexOf(otherBgCryptos[i]) != -1) {  // Alt-coin\n         if (getBooleanPreference(\"other-background\")) {\n-          return other_bg_cryptos[i];\n+          return otherBgCryptos[i];\n         }\n       }\n     }\n-    if (low_id.indexOf(\"litecoin\") != -1) {\n+    if (lowId.indexOf(\"litecoin\") != -1) {\n       if (getBooleanPreference(\"silver-background\")) { // Currency is Litecoin\n         return \"silver\";\n       }\n-    } else {\n-      if (getBooleanPreference(\"gold-background\")) { // Currency is Bitcoin\n-        return \"gold\";\n-      }\n+    } else if (getBooleanPreference(\"gold-background\")) { // Currency is Bitcoin\n+      return \"gold\";\n     }\n     return null;\n-  };\n-\n-  var labelWithCurrency = function(value, currency) {\n-    switch (getStringPreference(\"show-currency-label\")) {\n-    case 'B':\n-      return currency + value;\n-    case 'A':\n-      return value + currency;\n-    default:\n-      return value;\n-    }\n-  };\n-\n-  var showAddonUpdateDocument = function() {\n-    tabs.open(\"http://neoranga55.github.io/bitcoin-price-ticker/\");\n-  };\n-\n-  var showAddonUpdate = function(version) {\n-    try {\n-      if ( ! getBooleanPreference(\"show-updates\")) {\n-        return;\n-      } else if (prefs.getCharPref(\"extensions.ADDON_ID.version\") == version) { // Not updated\n-        return;\n-      }\n-    } catch (e) {} // There is no addon version set yet\n-    setTimeout(showAddonUpdateDocument, 5000); // Showing update webpage\n-    prefs.setCharPref(\"extensions.ADDON_ID.version\", version); // Update version number in preferences\n-  };\n-\n-  var getBooleanPreference = function(pref_name) {\n-    if (typeof Preferences.prefs[pref_name] == \"undefined\") {\n-       if (DEBUG) console.log(\"bitcoin-price-ticker addon error: \" + pref_name + \" preference is not defined\");\n-      return false;\n-    }\n-    else {\n-      return Preferences.prefs[pref_name];\n-    }\n-  };\n+  }\n \n-  var getIntegerPreference = function(pref_name) {\n-    if (typeof Preferences.prefs[pref_name] == \"undefined\") {\n-      if (DEBUG) console.log(\"bitcoin-price-ticker addon error: \" + pref_name + \" preference is not defined\");\n-      return -1;\n+  function getTickerConfigurationData(tickerId) {\n+    var fontSize = getIntegerPreference(\"defaultFontSize\");\n+    if (fontSize <= 0) {\n+      fontSize = DEFAULT_FONT_SIZE;\n     }\n-    else {\n-      return Preferences.prefs[pref_name];\n+    if (tickers[tickerId]) {\n+      tickers[tickerId].enabled = getBooleanPreference(\"p\" + tickerId);\n+      tickers[tickerId].currencyPosition = getStringPreference(\"show-currency-label\");\n+      tickers[tickerId].color = getStringPreference(\"p\" + tickerId + \"Color\");\n+      tickers[tickerId].fontSize = fontSize;\n+      tickers[tickerId].background = getBackgroundColor(tickerId);\n     }\n-  };\n-\n-  var getStringPreference = function(pref_name) {\n-    if (typeof Preferences.prefs[pref_name] == \"undefined\") {\n-      if (DEBUG) console.log(\"bitcoin-price-ticker addon error: \" + pref_name + \" preference is not defined\");\n-      return \"\";\n-    }\n-    else {\n-      return Preferences.prefs[pref_name];\n-    }\n-  };\n+  }\n \n   // Use tickers enabled in preferences to load in that order regardless of stored order\n-  var loadDefaultTickers = function() {\n-    for (var ticker_name in tickers) {\n-      if ( getBooleanPreference('p' + ticker_name) ) {\n-        tickers[ticker_name] = ticker_creators[ticker_name](); // Create Ticker\n+  function loadDefaultTickers() {\n+    for (var tickerId in tickers) {\n+      if ( getBooleanPreference(\"p\" + tickerId) ) { // Create Ticker\n+        updateTickerConfiguration(tickerId);\n+        if (tickers[tickerId].enabled) {\n+          orderedTickers.push(tickerId);\n+        }\n       }\n     }\n-    if ((ordered_tickers != null) && (ordered_tickers.length > 0)) {\n+    if ((orderedTickers != null) && (orderedTickers.length > 0)) {\n       storeTickersOrder();\n     }\n-  };\n+  }\n \n   // Load the order of the tickers and simultaneously create them\n-  var loadTickersInOrder = function() {\n-    var ordered_active_tickers = \"\";\n+  function loadTickersInOrder() {\n+    var orderedActiveTickers = \"\";\n     try {\n-      ordered_active_tickers = prefs.getCharPref(\"extensions.ADDON_ID.tickers_order\");\n-      if (ordered_active_tickers.length < 1) { // There is no addon tickers_order set yet\n+      orderedActiveTickers = prefs.getCharPref(\"extensions.ADDON_ID.tickers_order\");\n+      if (orderedActiveTickers.length < 1) { // There is no order of tickers in addon set yet\n         loadDefaultTickers();\n         return;\n       }\n-      var list_ordered_tickers = ordered_active_tickers.split(',');\n-      if (list_ordered_tickers.length < 1) { // There is no addon tickers_order set yet\n+      var listOrderedTickers = orderedActiveTickers.split(\",\");\n+      if (listOrderedTickers.length < 1) { // There is no order of tickers in addon set yet\n         loadDefaultTickers();\n         return;\n       }\n-      for (var i in list_ordered_tickers) {\n-        var ticker_name = list_ordered_tickers[i];\n-        tickers[ticker_name] = ticker_creators[ticker_name](); // Create Ticker\n+      for (var i in listOrderedTickers) {\n+        loadTicker(listOrderedTickers[i]);\n+        if (tickers[tickerId].enabled) {\n+          orderedTickers.push(tickerId);\n+        }\n       }\n-    } catch (e) { // There is no addon tickers_order set yet\n+    } catch (e) { // There is no order of tickers in addon set yet\n       loadDefaultTickers();\n     }\n-  };\n+  }\n \n   // Store the order of the active tickers\n-  var storeTickersOrder = function() {\n-    if ((ordered_tickers == null) || (ordered_tickers.length == 0)) {\n+  function storeTickersOrder() {\n+    if ((orderedTickers == null) || (orderedTickers.length == 0)) {\n       loadDefaultTickers();\n     } else {\n-      var ordered_active_tickers = \"\";\n-      if ((ordered_tickers != null) && (ordered_tickers.length > 0)) {\n-        for (var i in ordered_tickers) { // Traverse skipping empty\n-          if (ordered_active_tickers.length > 0) {\n-            ordered_active_tickers += \",\" + ordered_tickers[i];\n+      var orderedActiveTickers = \"\";\n+      if ((orderedTickers != null) && (orderedTickers.length > 0)) {\n+        for (var i in orderedTickers) { // Traverse skipping empty\n+          if (orderedActiveTickers.length > 0) {\n+            orderedActiveTickers += \",\" + orderedTickers[i];\n           } else {\n-            ordered_active_tickers = ordered_tickers[i];\n+            orderedActiveTickers = orderedTickers[i];\n           }\n         }\n       }\n-      prefs.setCharPref(\"extensions.ADDON_ID.tickers_order\", ordered_active_tickers); // Update list of tickers active in order in preferences\n+      if (DEBUG) {\n+        console.log(\"Storing tickers in order:\" + orderedActiveTickers);\n+      }\n+      prefs.setCharPref(\"extensions.ADDON_ID.tickers_order\", orderedActiveTickers); // Update list of tickers active in order in preferences\n     }\n-  };\n+  }\n \n   // Live enable/disable ticker from options checkbox\n-  var toggleTicker = function(tickerName) {\n-    if ( getBooleanPreference('p' + tickerName) ) { // Enable Ticker\n-      if (tickers[tickerName] == null) {\n-        tickers[tickerName] = ticker_creators[tickerName]();\n-        storeTickersOrder();\n-      }\n-    } else if ( tickers[tickerName] != null ) { // Disable Ticker if it exists\n-      clearInterval(tickers[tickerName][3]); // Stop automatic refresh of removed ticker\n-      for (var position in ordered_tickers) {\n-        if (ordered_tickers[position] == tickerName) {\n-          ordered_tickers.splice(position, 1); // Remove the position completely from the array with reordering\n+  function toggleTicker(tickerId) {\n+    if ( getBooleanPreference(\"p\" + tickerId) ) { // Enable Ticker\n+      updateTickerConfiguration(tickerId);\n+      updateTickerRefreshIntervalForTicker(tickerId);\n+      orderedTickers.push(tickerId);\n+      storeTickersOrder();\n+    } else if (tickers[tickerId].enabled) { // Disable Ticker if it exists\n+      tickers[tickerId].enabled = false;\n+      stopAutoPriceUpdate(tickerId);\n+      updateTickerConfiguration(tickerId);\n+      for (var i = 0; i < orderedTickers.length; i++) {\n+        if (orderedTickers[i] == tickerId) {\n+          orderedTickers.splice(i, 1); // Remove the ticker completely from the array with reordering\n           break;\n         }\n       }\n-      tickers[tickerName][0].destroy(); // Destroy unwanted ticker widget\n-      tickers[tickerName] = null;\n       storeTickersOrder();\n     }\n-  };\n+  }\n+\n+  function updateTickerConfiguration(tickerId) {\n+    getTickerConfigurationData(tickerId);\n+    if (DEBUG) {\n+      console.log(\"Sending config JSON data to frame:\" + tickerId + \"-\" + JSON.stringify(tickers[tickerId]));\n+    }\n+    tickersFrame.postMessage({\n+      \"type\": \"updateTickerConfiguration\",\n+      \"id\": tickerId,\n+      \"data\": tickers[tickerId]\n+    }, tickersFrame.url);\n+  }\n+\n+  function fetchURLData(id, url, jsonPath) {\n+    if (id == \"undefined\" || url == \"undefined\" || jsonPath == \"undefined\") {\n+      return;\n+    }\n+    if (DEBUG) {\n+      console.log(\"Requesting JSON data from \" + url);\n+    }\n+    Request({\n+      url: url,\n+      onComplete: function (response) {\n+        if ((response != null) && (response.json != null)) {\n+          if (DEBUG) {\n+            console.log(\"Data received, searching in document for path:\" + jsonPath);\n+          }\n+          var price = response.json;\n+          for (var i = 0; i < jsonPath.length; i++) { // Parse JSON path\n+            if (typeof price[jsonPath[i]] == \"undefined\") {\n+              if (DEBUG) {\n+                console.log(\"BitcoinPriceTicker error loading ticker \" + id + \n+                            \". URL is not correctly responding:\" + url);\n+              }\n+              return;\n+            }\n+            price = price[jsonPath[i]];\n+          }\n+          if (DEBUG) {\n+            console.log(\"Price received and parsed: \" + price);\n+          }\n+          tickersFrame.postMessage({\n+            \"type\": \"updateTickerModelPrice\",\n+            \"id\": id,\n+            \"data\": {\n+              \"price\": price\n+            }\n+          }, tickersFrame.url);\n+        }\n+      }\n+    }).get();\n+  }\n+\n+  function startAutoPriceUpdate(tickerId) {\n+    if (tickers[tickerId].url && tickers[tickerId].jsonPath) {\n+      var fetchURLDataWrapper = function() {\n+        fetchURLData(tickerId, tickers[tickerId].url, tickers[tickerId].jsonPath);\n+      };\n+      fetchURLDataWrapper();\n+      tickers[tickerId].timer = setInterval(fetchURLDataWrapper, (tickers[tickerId].updateInterval * 1000));\n+    }\n+  }\n+\n+  function stopAutoPriceUpdate(tickerId) {\n+    if (tickers[tickerId].timer) { // Remove previous auto-update call if any\n+      clearInterval(tickers[tickerId].timer); // Stop automatic refresh\n+      tickers[tickerId].timer = null;\n+    }\n+  }\n \n-  // Refresh ticker when changing add-on options\n-  var updateTickerCaller = function(tickerName, onlyStyle) {\n-    if ( (tickers[tickerName] != null) && (tickers[tickerName].length >= 2)) {\n-      if (onlyStyle) {\n-        tickers[tickerName][2](); // Call update Ticker method to update only the style\n-      } else {\n-        tickers[tickerName][1](); // Call update Ticker method\n+  function updateTickerRefreshIntervalForTicker(tickerId) {\n+    var refreshRate = getIntegerPreference(\"Timer\");\n+    if (refreshRate < 1) {\n+      refreshRate = DEFAULT_REFRESH_RATE;\n+    }\n+    if (tickers[tickerId] && tickers[tickerId].enabled) {\n+      if (DEBUG) {\n+        console.log(\"updateTickerRefreshIntervalForTicker:\" + tickerId);\n+      }\n+      if (tickers[tickerId].updateInterval != refreshRate) { // Update the real interval\n+        tickers[tickerId].updateInterval = refreshRate;\n+        stopAutoPriceUpdate(tickerId);\n+        startAutoPriceUpdate(tickerId);\n       }\n     }\n-  };\n+  }\n \n   // Create new refresh interval for each ticker when option is changed\n-  var updateTickerRefreshInterval = function() {\n-    var refresh_rate = getIntegerPreference(\"Timer\");\n-    if (refresh_rate < 1) {\n-      refresh_rate = DEFAULT_REFRESH_RATE;\n-    }\n-    for (var i in tickers) {\n-      if ( (tickers[i] != null) && (tickers[i].length >= 4)) {\n-        clearInterval(tickers[i][3]); // Stop automatic refresh of removed ticker\n-        tickers[i][3] = setInterval(tickers[i][1], (refresh_rate * 1000));\n+  function updateTickerRefreshInterval() {\n+    for (var tickerId in tickers) { // Update all tickers that require it\n+      updateTickerRefreshIntervalForTicker(tickerId);\n+    }\n+  }\n+\n+  function updateActiveTickersSharedStyle() {\n+    for (tickerId in tickers) {\n+      if (tickers[tickerId] && tickers[tickerId].enabled) {\n+        updateTickerConfiguration(tickerId); // Update configuration\n       }\n     }\n-  };\n+  }\n+\n+  function showAddonUpdateDocument() {\n+    tabs.open(ADDON_UPDATE_DOCUMENT_URL);\n+  }\n \n-  var updateAllTickers = function() {\n-    for (var i in tickers) {\n-      if ( (tickers[i] != null) && (tickers[i].length >= 3)) {\n-        tickers[i][1](); // Call update Ticker method\n+  function showAddonUpdate(version) {\n+    try {\n+      if (( ! getBooleanPreference(\"show-updates\")) || // Requested to not show updates\n+          (prefs.getCharPref(\"extensions.ADDON_ID.version\") == version)) { // Not updated\n+        return;\n       }\n+    } catch (e) {} // There is no addon version set yet\n+    if (! DEBUG) {\n+      setTimeout(showAddonUpdateDocument, 5000); // Showing update webpage\n     }\n-  };\n+    prefs.setCharPref(\"extensions.ADDON_ID.version\", version); // Update version number in preferences\n+  }\n \n-  var updateStyleAllTickers = function() {\n-    for (var i in tickers) {\n-      if ( (tickers[i] != null) && (tickers[i].length >= 3)) {\n-        tickers[i][2](); // Call update Ticker style method\n+  function loadProvidersData() {\n+    var url = DATA_PROVIDERS_URL;\n+    if (DEBUG) {\n+      console.log(\"Requesting JSON data from \" + DATA_PROVIDERS_URL);\n+    }\n+    Request({\n+      url: url,\n+      onComplete: function (response) {\n+        if ((response != null) && (response.json != null)) {\n+          if (DEBUG) {\n+            console.log(\"Data received from data providers JSON configuration\");\n+          }\n+          tickers = response.json;\n+          if (Object.keys(tickers).length == 0) {","path":"index.js","position":515,"original_position":515,"commit_id":"36fc962525c90413bb78e86f3ad24d4406d5e6f1","original_commit_id":"36fc962525c90413bb78e86f3ad24d4406d5e6f1","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Use '===' to compare with '0'.<br>Too many errors. (66% scanned).","created_at":"2015-08-20T15:23:10Z","updated_at":"2015-08-20T15:23:10Z","html_url":"https://github.com/neoranga55/bitcoin-price-ticker/pull/13#discussion_r37542479","pull_request_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/comments/37542479"},"html":{"href":"https://github.com/neoranga55/bitcoin-price-ticker/pull/13#discussion_r37542479"},"pull_request":{"href":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/13","id":42938187,"html_url":"https://github.com/neoranga55/bitcoin-price-ticker/pull/13","diff_url":"https://github.com/neoranga55/bitcoin-price-ticker/pull/13.diff","patch_url":"https://github.com/neoranga55/bitcoin-price-ticker/pull/13.patch","issue_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/issues/13","number":13,"state":"open","locked":false,"title":"Refactor to use firefox frames","user":{"login":"neoranga55","id":1936647,"avatar_url":"https://avatars.githubusercontent.com/u/1936647?v=3","gravatar_id":"","url":"https://api.github.com/users/neoranga55","html_url":"https://github.com/neoranga55","followers_url":"https://api.github.com/users/neoranga55/followers","following_url":"https://api.github.com/users/neoranga55/following{/other_user}","gists_url":"https://api.github.com/users/neoranga55/gists{/gist_id}","starred_url":"https://api.github.com/users/neoranga55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neoranga55/subscriptions","organizations_url":"https://api.github.com/users/neoranga55/orgs","repos_url":"https://api.github.com/users/neoranga55/repos","events_url":"https://api.github.com/users/neoranga55/events{/privacy}","received_events_url":"https://api.github.com/users/neoranga55/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-20T14:51:02Z","updated_at":"2015-08-20T15:23:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4560082f95625c11a05dc769c204309613ff2848","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/13/commits","review_comments_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/13/comments","review_comment_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/issues/13/comments","statuses_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/statuses/36fc962525c90413bb78e86f3ad24d4406d5e6f1","head":{"label":"neoranga55:refactor-to-use-firefox-frames","ref":"refactor-to-use-firefox-frames","sha":"36fc962525c90413bb78e86f3ad24d4406d5e6f1","user":{"login":"neoranga55","id":1936647,"avatar_url":"https://avatars.githubusercontent.com/u/1936647?v=3","gravatar_id":"","url":"https://api.github.com/users/neoranga55","html_url":"https://github.com/neoranga55","followers_url":"https://api.github.com/users/neoranga55/followers","following_url":"https://api.github.com/users/neoranga55/following{/other_user}","gists_url":"https://api.github.com/users/neoranga55/gists{/gist_id}","starred_url":"https://api.github.com/users/neoranga55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neoranga55/subscriptions","organizations_url":"https://api.github.com/users/neoranga55/orgs","repos_url":"https://api.github.com/users/neoranga55/repos","events_url":"https://api.github.com/users/neoranga55/events{/privacy}","received_events_url":"https://api.github.com/users/neoranga55/received_events","type":"User","site_admin":false},"repo":{"id":13824499,"name":"bitcoin-price-ticker","full_name":"neoranga55/bitcoin-price-ticker","owner":{"login":"neoranga55","id":1936647,"avatar_url":"https://avatars.githubusercontent.com/u/1936647?v=3","gravatar_id":"","url":"https://api.github.com/users/neoranga55","html_url":"https://github.com/neoranga55","followers_url":"https://api.github.com/users/neoranga55/followers","following_url":"https://api.github.com/users/neoranga55/following{/other_user}","gists_url":"https://api.github.com/users/neoranga55/gists{/gist_id}","starred_url":"https://api.github.com/users/neoranga55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neoranga55/subscriptions","organizations_url":"https://api.github.com/users/neoranga55/orgs","repos_url":"https://api.github.com/users/neoranga55/repos","events_url":"https://api.github.com/users/neoranga55/events{/privacy}","received_events_url":"https://api.github.com/users/neoranga55/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neoranga55/bitcoin-price-ticker","description":"Bitcoin Price Ticker Firefox Addon with multiple price sources and configuration options","fork":false,"url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker","forks_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/forks","keys_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/teams","hooks_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/hooks","issue_events_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/issues/events{/number}","events_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/events","assignees_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/assignees{/user}","branches_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/branches{/branch}","tags_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/tags","blobs_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/git/refs{/sha}","trees_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/statuses/{sha}","languages_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/languages","stargazers_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/stargazers","contributors_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/contributors","subscribers_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/subscribers","subscription_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/subscription","commits_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/commits{/sha}","git_commits_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/git/commits{/sha}","comments_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/comments{/number}","issue_comment_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/issues/comments{/number}","contents_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/contents/{+path}","compare_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/merges","archive_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/downloads","issues_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/issues{/number}","pulls_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls{/number}","milestones_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/milestones{/number}","notifications_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/labels{/name}","releases_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/releases{/id}","created_at":"2013-10-24T06:39:00Z","updated_at":"2015-06-08T06:07:53Z","pushed_at":"2015-08-20T15:23:03Z","git_url":"git://github.com/neoranga55/bitcoin-price-ticker.git","ssh_url":"git@github.com:neoranga55/bitcoin-price-ticker.git","clone_url":"https://github.com/neoranga55/bitcoin-price-ticker.git","svn_url":"https://github.com/neoranga55/bitcoin-price-ticker","homepage":"https://addons.mozilla.org/en-US/firefox/addon/bitcoin-price-ticker/","size":5512,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":8,"default_branch":"master"}},"base":{"label":"neoranga55:master","ref":"master","sha":"5742e399502b4c03e417679c9fb6dc6ff4713d43","user":{"login":"neoranga55","id":1936647,"avatar_url":"https://avatars.githubusercontent.com/u/1936647?v=3","gravatar_id":"","url":"https://api.github.com/users/neoranga55","html_url":"https://github.com/neoranga55","followers_url":"https://api.github.com/users/neoranga55/followers","following_url":"https://api.github.com/users/neoranga55/following{/other_user}","gists_url":"https://api.github.com/users/neoranga55/gists{/gist_id}","starred_url":"https://api.github.com/users/neoranga55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neoranga55/subscriptions","organizations_url":"https://api.github.com/users/neoranga55/orgs","repos_url":"https://api.github.com/users/neoranga55/repos","events_url":"https://api.github.com/users/neoranga55/events{/privacy}","received_events_url":"https://api.github.com/users/neoranga55/received_events","type":"User","site_admin":false},"repo":{"id":13824499,"name":"bitcoin-price-ticker","full_name":"neoranga55/bitcoin-price-ticker","owner":{"login":"neoranga55","id":1936647,"avatar_url":"https://avatars.githubusercontent.com/u/1936647?v=3","gravatar_id":"","url":"https://api.github.com/users/neoranga55","html_url":"https://github.com/neoranga55","followers_url":"https://api.github.com/users/neoranga55/followers","following_url":"https://api.github.com/users/neoranga55/following{/other_user}","gists_url":"https://api.github.com/users/neoranga55/gists{/gist_id}","starred_url":"https://api.github.com/users/neoranga55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neoranga55/subscriptions","organizations_url":"https://api.github.com/users/neoranga55/orgs","repos_url":"https://api.github.com/users/neoranga55/repos","events_url":"https://api.github.com/users/neoranga55/events{/privacy}","received_events_url":"https://api.github.com/users/neoranga55/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neoranga55/bitcoin-price-ticker","description":"Bitcoin Price Ticker Firefox Addon with multiple price sources and configuration options","fork":false,"url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker","forks_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/forks","keys_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/teams","hooks_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/hooks","issue_events_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/issues/events{/number}","events_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/events","assignees_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/assignees{/user}","branches_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/branches{/branch}","tags_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/tags","blobs_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/git/refs{/sha}","trees_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/statuses/{sha}","languages_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/languages","stargazers_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/stargazers","contributors_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/contributors","subscribers_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/subscribers","subscription_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/subscription","commits_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/commits{/sha}","git_commits_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/git/commits{/sha}","comments_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/comments{/number}","issue_comment_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/issues/comments{/number}","contents_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/contents/{+path}","compare_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/merges","archive_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/downloads","issues_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/issues{/number}","pulls_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls{/number}","milestones_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/milestones{/number}","notifications_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/labels{/name}","releases_url":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/releases{/id}","created_at":"2013-10-24T06:39:00Z","updated_at":"2015-06-08T06:07:53Z","pushed_at":"2015-08-20T15:23:03Z","git_url":"git://github.com/neoranga55/bitcoin-price-ticker.git","ssh_url":"git@github.com:neoranga55/bitcoin-price-ticker.git","clone_url":"https://github.com/neoranga55/bitcoin-price-ticker.git","svn_url":"https://github.com/neoranga55/bitcoin-price-ticker","homepage":"https://addons.mozilla.org/en-US/firefox/addon/bitcoin-price-ticker/","size":5512,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/13"},"html":{"href":"https://github.com/neoranga55/bitcoin-price-ticker/pull/13"},"issue":{"href":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/issues/13"},"comments":{"href":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/neoranga55/bitcoin-price-ticker/statuses/36fc962525c90413bb78e86f3ad24d4406d5e6f1"}}}}