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)
19
19
return $ request ->isValid () && $ request ->match ([
20
20
'https://maps.google.* ' ,
21
21
'https://www.google.*/maps* ' ,
22
+ 'https://calendar.google.com/calendar/* ' ,
22
23
'https://drive.google.com/file/*/view ' ,
23
24
'https://plus.google.com/*/posts/* ' ,
24
25
]);
@@ -49,6 +50,10 @@ public function getCode()
49
50
.'<div class="g-post" data-href=" ' .$ this ->request ->getUrl ().'"></div> ' ;
50
51
}
51
52
53
+ if ($ this ->request ->getHost () === 'calendar.google.com ' ) {
54
+ return Utils::iframe ($ this ->request ->getUrl ());
55
+ }
56
+
52
57
if (($ google = $ this ->getProvider ('google ' ))) {
53
58
return $ google ->getCode ();
54
59
}
Original file line number Diff line number Diff line change @@ -39,4 +39,17 @@ public function testPlus()
39
39
]
40
40
);
41
41
}
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
+ }
42
55
}
You can’t perform that action at this time.
0 commit comments