var hostProcess = process;
var hostRequire = require;

process.once('loaded', function(){

  global.host = {};

  ipc = hostRequire('electron').ipcRenderer;

  webFrame = hostRequire('electron').webFrame;
  webFrame.registerURLSchemeAsBypassingCSP("hax")
  webFrame.registerURLSchemeAsBypassingCSP("haxs")
  webFrame.registerURLSchemeAsBypassingCSP("localhax")
  webFrame.registerURLSchemeAsSecure("hax")
  webFrame.registerURLSchemeAsSecure("haxs")
  webFrame.registerURLSchemeAsSecure("localhax")

  global.host.zoom = {

    localStorageKey: "default-zoom",

    setZoom: function(zoom) {
      webFrame.setZoomFactor(zoom);
      localStorage.setItem(global.host.zoom.localStorageKey, zoom);
    },

    increase: function() {
      zoom = webFrame.getZoomFactor();
      global.host.zoom.setZoom(zoom + 0.1);
    },

    decrease: function() {
      zoom = webFrame.getZoomFactor();
      global.host.zoom.setZoom(zoom - 0.1);
    },

    reset: function() {
      global.host.zoom.setZoom(1);
    }
  }

  var defaultZoom = localStorage.getItem(global.host.zoom.localStorageKey);
  if (defaultZoom != null) {
    // set the default zoom that we saved previously
    global.host.zoom.setZoom(parseFloat(defaultZoom));
  }
});

@@ -1219,13 +1219,587 @@
 m));%0A  %7D
+%0A%0A  //TS.client.ui.active_highlight_count%0A  //TS.model.prefs.mac_ssb_bounce, %22short%22 or %22long%22%0A  global.dock = %7B%0A    bounce: function() %7B%0A      var preference, type;%0A      preference = TS.model.prefs.mac_ssb_bounce;%0A      if (!(preference === %22long%22 %7C%7C preference === %22short%22)) %7B%0A        return;%0A      %7D%0A      type = TS.model.prefs.mac_ssb_bounce === %22short%22 ? %22informational%22 : %22critical%22;%0A      return ipc.send('bounce', %7B%0A        type: type%0A      %7D);%0A    %7D,%0A%0A    badge: function(message) %7B%0A      return ipc.send('badge', %7B%0A        badge_text: message%0A      %7D);%0A    %7D%0A  %7D;
 %0A%7D);%0A

Provide window.dock.bounce and window.dock.badge