Browse Source

Fixed username hl in safari

master
Igor Zhukov 10 years ago
parent
commit
c296db056e
  1. 2
      app/js/message_composer.js
  2. 2
      app/js/services.js

2
app/js/message_composer.js

@ -508,11 +508,13 @@ MessageComposer.prototype.setUpInput = function () {
this.setUpPlaintext(); this.setUpPlaintext();
} }
if (!Config.Mobile) {
var sbWidth = getScrollWidth(); var sbWidth = getScrollWidth();
if (sbWidth) { if (sbWidth) {
(this.richTextareaEl || this.textareaEl).css({marginRight: -sbWidth}); (this.richTextareaEl || this.textareaEl).css({marginRight: -sbWidth});
} }
} }
}
MessageComposer.prototype.setUpRich = function () { MessageComposer.prototype.setUpRich = function () {
this.textareaEl.hide(); this.textareaEl.hide();

2
app/js/services.js

@ -4596,7 +4596,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
var usernameRegExp = "[a-zA-Z\\d_]{5,32}"; var usernameRegExp = "[a-zA-Z\\d_]{5,32}";
var botCommandRegExp = "\\/([a-zA-Z\\d_]{1,32})(?:@(" + usernameRegExp + "))?(\\s|$)" var botCommandRegExp = "\\/([a-zA-Z\\d_]{1,32})(?:@(" + usernameRegExp + "))?(\\s|$)"
var fullRegExp = new RegExp('(^|\\s)(@)(' + usernameRegExp + ')|(' + urlRegExp + ')|(\\n)|(' + emojiRegExp + ')|(^|\\s)(#[' + alphaNumericRegExp + ']{2,64})|(^|\\s)' + botCommandRegExp, 'i'); var fullRegExp = new RegExp('(^| )(@)(' + usernameRegExp + ')|(' + urlRegExp + ')|(\\n)|(' + emojiRegExp + ')|(^|\\s)(#[' + alphaNumericRegExp + ']{2,64})|(^|\\s)' + botCommandRegExp, 'i');
var emailRegExp = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; var emailRegExp = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
var youtubeRegExp = /^(?:https?:\/\/)?(?:www\.)?youtu(?:|\.be|be\.com|\.b)(?:\/v\/|\/watch\\?v=|e\/|(?:\/\??#)?\/watch(?:.+)v=)(.{11})(?:\&[^\s]*)?/; var youtubeRegExp = /^(?:https?:\/\/)?(?:www\.)?youtu(?:|\.be|be\.com|\.b)(?:\/v\/|\/watch\\?v=|e\/|(?:\/\??#)?\/watch(?:.+)v=)(.{11})(?:\&[^\s]*)?/;

Loading…
Cancel
Save