diff --git a/app/assets/javascripts/discourse/views/modal/upload_selector_view.js b/app/assets/javascripts/discourse/views/modal/upload_selector_view.js index 37a39a09347..14903bf70c0 100644 --- a/app/assets/javascripts/discourse/views/modal/upload_selector_view.js +++ b/app/assets/javascripts/discourse/views/modal/upload_selector_view.js @@ -20,15 +20,12 @@ Discourse.UploadSelectorView = Discourse.ModalBodyView.extend({ }.property("controller.local"), hint: function() { + // cf. http://stackoverflow.com/a/9851769/11983 + var isChrome = !!window.chrome && !(!!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0); // chrome is the only browser that support copy & paste of images. return I18n.t("upload_selector.hint" + (this.get("isChrome") ? "_for_chrome" : "")); }.property(), - isChrome: function() { - // cf. http://stackoverflow.com/a/9851769/11983 - return !!window.chrome && !(!!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0); - }.property(), - didInsertElement: function() { this._super(); this.selectedChanged();