no need for a computed property

This commit is contained in:
Régis Hanol 2013-10-11 11:30:40 +02:00
parent 27985292e3
commit cf3c4fd743
1 changed files with 2 additions and 5 deletions

View File

@ -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();