File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public static function check(Request $request)
1919 return $ request ->isValid () && $ request ->match ([
2020 'https://maps.google.* ' ,
2121 'https://www.google.*/maps* ' ,
22+ 'https://calendar.google.com/calendar/* ' ,
2223 'https://drive.google.com/file/*/view ' ,
2324 'https://plus.google.com/*/posts/* ' ,
2425 ]);
@@ -49,6 +50,10 @@ public function getCode()
4950 .'<div class="g-post" data-href=" ' .$ this ->request ->getUrl ().'"></div> ' ;
5051 }
5152
53+ if ($ this ->request ->getHost () === 'calendar.google.com ' ) {
54+ return Utils::iframe ($ this ->request ->getUrl ());
55+ }
56+
5257 if (($ google = $ this ->getProvider ('google ' ))) {
5358 return $ google ->getCode ();
5459 }
Original file line number Diff line number Diff line change @@ -39,4 +39,17 @@ public function testPlus()
3939 ]
4040 );
4141 }
42+
43+ public function testCalendar ()
44+ {
45+ $ this ->assertEmbed (
46+ 'https://calendar.google.com/calendar/embed?src=spain__es%40holiday.calendar.google.com&ctz=Europe/Madrid ' ,
47+ [
48+ 'title ' => 'Festivos en España ' ,
49+ 'type ' => 'rich ' ,
50+ 'code ' => '<iframe src="https://calendar.google.com/calendar/embed?src=spain__es%40holiday.calendar.google.com&ctz=Europe%2FMadrid" frameborder="0" allowTransparency="true" style="border:none;overflow:hidden;width:600px;height:400px;"></iframe> ' ,
51+ 'providerName ' => 'google ' ,
52+ ]
53+ );
54+ }
4255}
You can’t perform that action at this time.
0 commit comments