File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11export default {
22
3- re : / ^ h t t p s ? : \/ \/ i s s u u \. c o m \/ [ \w _ . - ] + \/ d o c s \/ ( [ \w _ . - ] + ) / i,
3+ re : / ^ h t t p s ? : \/ \/ i s s u u \. c o m \/ ( [ \w _ . - ] + ) \/ d o c s \/ ( [ \w _ . - ] + ) / i,
44
5- mixins : [
6- "oembed-thumbnail" ,
7- "oembed-author" ,
8- "oembed-title" ,
9- "oembed-site" ,
10- "oembed-description" ,
11- // "og-video",
12- 'domain-icon'
13- ] ,
5+ mixins : [ "*" ] ,
146
15- getLink : function ( oembed ) {
7+ getLink : function ( urlMatch ) {
168
17- if ( ! oembed . html ) {
9+ if ( ! urlMatch || urlMatch . length < 3 ) {
1810 return ;
1911 }
2012
21- // let's make it responsive
22- var html = oembed . html . replace ( / s t y l e = \" [ ^ \" ] + \" / i, 'style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;"' ) ;
13+ const embedUrl = `https://e.issuu.com/embed.html?d=${ encodeURIComponent ( urlMatch [ 2 ] ) } &u=${ encodeURIComponent ( urlMatch [ 1 ] ) } ` ;
14+
15+ let html = `<iframe src="${ embedUrl } " style="border:none;width:100%;height:100%;" allowfullscreen allow="fullscreen"></iframe>` ;
16+
17+ html = html . replace ( / s t y l e = \" [ ^ \" ] + \" / i, 'style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;"' ) ;
18+
2319 var aspect = 4 / 3 ;
2420 html = '<div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: ' +
2521 Math . round ( 1000 * 100 / aspect ) / 1000
@@ -36,6 +32,7 @@ export default {
3632
3733 tests : [
3834 "https://issuu.com/redbulletin.com/docs/the_red_bulletin_stratos_special_us" ,
35+ "https://issuu.com/cambridgenews/docs/cambridge_news_march_26_2026" ,
3936 "https://issuu.com/_dca/docs/edicio_n_diario_de_centro_ame_rica_02_de_junio_de_20" ,
4037 "https://issuu.com/visitfaroeislands/docs/tg25-uk-web_compressed" ,
4138 "https://issuu.com/cbmicheals/docs/wwii_hero_franklin_micheals" ,
You can’t perform that action at this time.
0 commit comments