From 10480843c24e9fd4ec2881765f8f3c3a14699818 Mon Sep 17 00:00:00 2001 From: Vivien Didelot Date: Fri, 18 Oct 2013 17:32:39 -0400 Subject: [PATCH] plugins: add Google Maps support --- js/plugins.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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] } });