Browse Source

Use same format triggers as Android (#1323)

master
Joseph Stevens 8 years ago committed by Igor Zhukov
parent
commit
bef95d7fed
  1. 16
      app/js/lib/ng_utils.js

16
app/js/lib/ng_utils.js

@ -1239,7 +1239,7 @@ angular.module('izhukov.utils', [])
var spotifyRegExp = /(https?:\/\/(open\.spotify\.com|play\.spotify\.com|spoti\.fi)\/(.+)|spotify:(.+))/i var spotifyRegExp = /(https?:\/\/(open\.spotify\.com|play\.spotify\.com|spoti\.fi)\/(.+)|spotify:(.+))/i
var markdownTestRegExp = /[`_*@]/ var markdownTestRegExp = /[`_*@]/
var markdownRegExp = /(^|\s)(````?)([\s\S]+?)(````?)([\s\n\.,:?!;]|$)|(^|\s)([`*_])([^\n]+?)\7([\s\.,:?!;]|$)|@(\d+)\s*\((.+?)\)/ var markdownRegExp = /(^|\s)(````?)([\s\S]+?)(````?)([\s\n\.,:?!;]|$)|(^|\s)(`|\*\*|__)([^\n]+?)\7([\s\.,:?!;]|$)|@(\d+)\s*\((.+?)\)/
var siteHashtags = { var siteHashtags = {
Telegram: 'tg://search_hashtag?hashtag={1}', Telegram: 'tg://search_hashtag?hashtag={1}',
@ -1257,8 +1257,8 @@ angular.module('izhukov.utils', [])
var markdownEntities = { var markdownEntities = {
'`': 'messageEntityCode', '`': 'messageEntityCode',
'*': 'messageEntityBold', '**': 'messageEntityBold',
'_': 'messageEntityItalic' '__': 'messageEntityItalic'
} }
return { return {
@ -1824,13 +1824,13 @@ angular.module('izhukov.utils', [])
case 'messageEntityBold': case 'messageEntityBold':
code.push( code.push(
'*', entityText, '*' '**', entityText, '**'
) )
break break
case 'messageEntityItalic': case 'messageEntityItalic':
code.push( code.push(
'_', entityText, '_' '__', entityText, '__'
) )
break break
@ -2089,7 +2089,7 @@ angular.module('izhukov.utils', [])
return return
} }
settings.baseUrl = (location.href || '').replace(/#.*$/, '') + '#/im' settings.baseUrl = (location.href || '').replace(/#.*$/, '') + '#/im'
var eventData = { var eventData = {
type: 'ping', type: 'ping',
localNotifications: localNotificationsAvailable, localNotifications: localNotificationsAvailable,
@ -2150,7 +2150,7 @@ angular.module('izhukov.utils', [])
if (subscription) { if (subscription) {
var subscriptionObj = subscription.toJSON() var subscriptionObj = subscription.toJSON()
if (!subscriptionObj || if (!subscriptionObj ||
!subscriptionObj.endpoint || !subscriptionObj.endpoint ||
!subscriptionObj.keys || !subscriptionObj.keys ||
!subscriptionObj.keys.p256dh || !subscriptionObj.keys.p256dh ||
!subscriptionObj.keys.auth) { !subscriptionObj.keys.auth) {
@ -2181,4 +2181,4 @@ angular.module('izhukov.utils', [])
setSettings: setSettings setSettings: setSettings
} }
}) })

Loading…
Cancel
Save