From 7b636a7bc36d8b656d96d907d515e1eb065c8666 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Tue, 25 Apr 2017 17:33:39 -0300 Subject: [PATCH] Try to directly install screen share extension --- packages/rocketchat-webrtc/WebRTCClass.coffee | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/rocketchat-webrtc/WebRTCClass.coffee b/packages/rocketchat-webrtc/WebRTCClass.coffee index be46fdb70b83..a957e411d7cc 100644 --- a/packages/rocketchat-webrtc/WebRTCClass.coffee +++ b/packages/rocketchat-webrtc/WebRTCClass.coffee @@ -377,8 +377,13 @@ class WebRTCClass , (isConfirm) => if isConfirm if @navigator is 'chrome' - chrome.webstore.install undefined, refresh, -> - window.open('https://chrome.google.com/webstore/detail/rocketchat-screen-share/nocfbnnmjnndkbipkabodnheejiegccf') + url = 'https://chrome.google.com/webstore/detail/rocketchat-screen-share/nocfbnnmjnndkbipkabodnheejiegccf' + try + chrome.webstore.install url, refresh, -> + window.open(url) + refresh() + catch e + window.open(url) refresh() else if @navigator is 'firefox' window.open('https://addons.mozilla.org/en-GB/firefox/addon/rocketchat-screen-share/')