diff --git a/js/plugins.js b/js/plugins.js index 880eaab..8383476 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -219,7 +219,27 @@ plugins.factory('userPlugins', function() { }); cloudmusicPlugin.name = 'cloud music'; + /* + * Google Maps + */ + var googlemapPlugin = new Plugin(function(message) { + + var match = message.match(urlRegexp); + + if (match) { + var url = match[0]; + + /* SoundCloud http://help.soundcloud.com/customer/portal/articles/247785-what-widgets-can-i-use-from-soundcloud- */ + if (url.match(/google.*maps/)) { + return ''; + } + } + + return null; + }); + googlemapPlugin.name = 'Google Map'; + return { - plugins: [youtubePlugin, imagePlugin, spotifyPlugin, cloudmusicPlugin] + plugins: [youtubePlugin, imagePlugin, spotifyPlugin, cloudmusicPlugin, googlemapPlugin] } });