|
|
|
@ -3798,6 +3798,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
@@ -3798,6 +3798,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|
|
|
|
var facebookRegex = /^https?:\/\/(?:www\.)?facebook\.com\/.+?\/posts\/\d+/i; |
|
|
|
|
var gplusRegex = /^https?:\/\/plus\.google\.com\/\d+\/posts\/[a-zA-Z0-9\-\_]+/i; |
|
|
|
|
var soundcloudRegex = /^https?:\/\/(?:soundcloud\.com|snd\.sc)\/([a-zA-Z0-9%\-\_]+)\/([a-zA-Z0-9%\-\_]+)/i; |
|
|
|
|
var spotifyRegex = /(https?:\/\/(open\.spotify\.com|play\.spotify\.com|spoti\.fi)\/(.+)|spotify:(.+))/i; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
wrapRichText: wrapRichText, |
|
|
|
@ -4022,6 +4024,9 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
@@ -4022,6 +4024,9 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|
|
|
|
return ['soundcloud', embedUrlMatches[0]]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if (embedUrlMatches = url.match(spotifyRegex)) { |
|
|
|
|
return ['spotify', embedUrlMatches[3].replace('/', ':')]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!Config.Modes.chrome_packed) { // Need external JS
|
|
|
|
|
if (embedUrlMatches = url.match(twitterRegex)) { |
|
|
|
|