New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from overrides/hacks to TSSSB integration #121

Closed
twolfson opened this Issue Jul 25, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@twolfson
Member

twolfson commented Jul 25, 2015

As discovered in #116, the Windows and OS X clients for Slack leverage window.TSSSB. This is a bridge between their browser windows and the container application. We should consider integrating with this over the hacks because:

  • It covers edge cases automatically (looks like there are about 10 edge cases)
  • Reduces number of moving parts (Slack most likely tests what they send to TSSSB so we will prob have less likely broken overrides)

By default, TSSSB is a noop that returns false

window.TSSSB; // {env, call}
window.TSSSB.env; // {lin_ssb_version: null, lin_ssb_version_minor: null, mac_ssb_version: null, mac_ssb_version_minor: null, win_ssb_version: null, win_ssb_version_minor: null}
window.TSSSB.call; // function () { return false; }

Some example integrations:

http://viewsource.in/https://slack.global.ssl.fastly.net/7eab/js/rollup-client.js#L18

http://viewsource.in/https://slack.global.ssl.fastly.net/7eab/js/rollup-client.js#L144

http://viewsource.in/https://slack.global.ssl.fastly.net/7eab/js/rollup-client.js#L1406

http://viewsource.in/https://slack.global.ssl.fastly.net/7eab/js/rollup-client.js#L1930 (oh hey, screenhero)

http://viewsource.in/https://slack.global.ssl.fastly.net/7eab/js/rollup-client.js#L10433

/cc @wlaurance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment