j1-template 2020.0.9 → 2020.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/blocks/ads/ad.html +64 -0
- data/_includes/themes/j1/blocks/footer/boxes/about_box.proc +1 -1
- data/_includes/themes/j1/blocks/footer/boxes/links_box.proc +2 -2
- data/_includes/themes/j1/blocks/footer/boxes/news_box.proc +2 -2
- data/_includes/themes/j1/layouts/content_generator_blog_archive.html +3 -2
- data/_includes/themes/j1/layouts/content_generator_collection.html +3 -2
- data/_includes/themes/j1/layouts/content_generator_page.html +26 -25
- data/_includes/themes/j1/layouts/content_generator_post.html +12 -12
- data/_includes/themes/j1/layouts/layout_metadata_generator.html +134 -4
- data/_includes/themes/j1/modules/connectors/ad/custom-provider.html +6 -9
- data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +9 -6
- data/_includes/themes/j1/modules/connectors/ads +3 -6
- data/_includes/themes/j1/modules/navigator/generator.html +0 -1
- data/_includes/themes/j1/modules/navigator/procedures/topsearch.proc +11 -6
- data/_includes/themes/j1/procedures/global/create_word_cloud.proc +5 -2
- data/_includes/themes/j1/procedures/layouts/content_writer.proc +8 -9
- data/_includes/themes/j1/procedures/layouts/module_writer.1.proc +270 -0
- data/_includes/themes/j1/procedures/layouts/module_writer.proc +3 -13
- data/_includes/themes/j1/procedures/posts/collate_timeline.proc +14 -14
- data/_layouts/default.html +76 -65
- data/apps/public/cc/index.adoc +2 -6
- data/assets/data/authclient.html +22 -12
- data/assets/data/banner.html +23 -23
- data/assets/data/carousel.json +30 -21
- data/assets/data/cookiebar.html +277 -0
- data/assets/data/footer.html +14 -7
- data/assets/data/galleries.json +90 -81
- data/assets/data/gallery_customizer.html +20 -11
- data/assets/data/jupyter/notebooks/_html/template.full.head.html +10 -10
- data/assets/data/jupyter/notebooks/_html/visualisation.html +11 -11
- data/assets/data/jupyter/notebooks/html/template.html +7 -7
- data/assets/data/jupyter/notebooks/html/visualisation.ok.html +12 -12
- data/assets/data/mdi_icons.json +55 -1
- data/assets/data/menu.html +16 -9
- data/assets/data/mmenu.html +48 -95
- data/assets/data/mmenu_sidebar.html +40 -44
- data/assets/data/mmenu_toc.html +20 -4
- data/assets/data/panel.html +41 -33
- data/assets/data/quicklinks.html +29 -19
- data/assets/data/search.json +162 -0
- data/assets/data/ssm.html +20 -9
- data/assets/data/themes.json +17 -6
- data/assets/data/twa_v1.json +54 -0
- data/assets/themes/j1/adapter/js/algolia.js +49 -30
- data/assets/themes/j1/adapter/js/attic.js +76 -64
- data/assets/themes/j1/adapter/js/carousel.js +58 -33
- data/assets/themes/j1/adapter/js/clipboard.js +232 -0
- data/assets/themes/j1/adapter/js/cookiebar.js +204 -0
- data/assets/themes/j1/adapter/js/framer.js +45 -22
- data/assets/themes/j1/adapter/js/gallery_customizer.js +238 -250
- data/assets/themes/j1/adapter/js/j1.js +573 -868
- data/assets/themes/j1/adapter/js/{justified_gallery.js → jf_gallery.js} +82 -55
- data/assets/themes/j1/adapter/js/lightbox.js +29 -11
- data/assets/themes/j1/adapter/js/logger.js +25 -10
- data/assets/themes/j1/adapter/js/mdb.js +164 -0
- data/assets/themes/j1/adapter/js/mmenu.js +74 -75
- data/assets/themes/j1/adapter/js/navigator.js +244 -228
- data/assets/themes/j1/adapter/js/searcher.js +40 -16
- data/assets/themes/j1/adapter/js/ssm.js +135 -134
- data/assets/themes/j1/adapter/js/themer.js +78 -102
- data/assets/themes/j1/adapter/js/toccer.js +38 -22
- data/assets/themes/j1/core/css/animate.css +2382 -0
- data/assets/themes/j1/core/css/animate.min.css +7 -0
- data/assets/themes/j1/core/css/fontawesome.css +4415 -0
- data/assets/themes/j1/core/css/fontawesome.min.css +1 -0
- data/assets/themes/j1/core/css/iconify-icons.css +4106 -0
- data/assets/themes/j1/core/css/iconify-icons.min.css +1 -0
- data/assets/themes/j1/core/css/material-design-icons.css +14532 -0
- data/assets/themes/j1/core/css/material-design-icons.min.css +1 -0
- data/assets/themes/j1/core/css/theme_extensions.css +209 -2917
- data/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
- data/assets/themes/j1/core/css/twemoji.css +9485 -0
- data/assets/themes/j1/core/css/twemoji.min.css +1 -0
- data/assets/themes/j1/core/css/uno.css +345 -2929
- data/assets/themes/j1/core/css/uno.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.css +767 -33214
- data/assets/themes/j1/core/css/vendor.min.css +2 -9
- data/assets/themes/j1/core/js/template.js +25 -416
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.min.js +1 -1
- data/assets/themes/j1/modules/backstretch/js/backstretch.js +1695 -0
- data/assets/themes/j1/modules/backstretch/js/backstretch.min.js +21 -0
- data/assets/themes/j1/modules/backstretch/js/backstretch.min.js.org +1 -0
- data/assets/themes/j1/modules/bmd/css/bootstrap-material-design.css +12177 -0
- data/assets/themes/j1/modules/bmd/css/bootstrap-material-design.min.css +8 -0
- data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.js +6930 -0
- data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.js.map +1 -0
- data/assets/themes/j1/modules/bmd/js/bootstrap-material-design.min.js +1 -0
- data/assets/themes/j1/modules/bootstrap/css/bootstrap.css +10278 -0
- data/assets/themes/j1/modules/bootstrap/css/bootstrap.css.map +1 -0
- data/assets/themes/j1/modules/bootstrap/css/bootstrap.min.css +7 -0
- data/assets/themes/j1/modules/bootstrap/css/bootstrap.min.css.map +1 -0
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.js +4420 -0
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.js.map +1 -0
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js +7 -0
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js.map +1 -0
- data/assets/themes/j1/modules/bsDatepicker/css/datepicker.css +203 -0
- data/assets/themes/j1/modules/bsDatepicker/css/theme/uno.css +235 -0
- data/assets/themes/j1/modules/bsDatepicker/js/datepicker.js +509 -0
- data/assets/themes/j1/modules/bsDatepicker/less/datepicker.less +122 -0
- data/assets/themes/j1/modules/bsThemeSwitcher/js/switcher.js +434 -0
- data/assets/themes/j1/modules/bsThemeSwitcher/js/switcher.min.js +20 -0
- data/assets/themes/j1/{extensions → modules}/carousel/css/carousel.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/css/carousel.min.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/css/carousel_transitions.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/css/carousel_transitions.min.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/{extensions → modules}/carousel/images/ajax-loader.gif +0 -0
- data/assets/themes/j1/{extensions → modules}/carousel/images/grabbing.png +0 -0
- data/assets/themes/j1/{extensions → modules}/carousel/images/owl-logo.png +0 -0
- data/assets/themes/j1/{extensions → modules}/carousel/images/owl.video.play.png +0 -0
- data/assets/themes/j1/{extensions → modules}/carousel/js/carousel.js +0 -0
- data/assets/themes/j1/{extensions → modules}/carousel/js/carousel.min.js +0 -0
- data/assets/themes/j1/modules/clipboard/LICENSE +20 -0
- data/assets/themes/j1/modules/clipboard/css/theme/uno.css +52 -0
- data/assets/themes/j1/modules/clipboard/css/theme/uno.min.css +52 -0
- data/assets/themes/j1/modules/clipboard/js/clipboard.js +975 -0
- data/assets/themes/j1/modules/clipboard/js/clipboard.min.js +7 -0
- data/assets/themes/j1/{extensions/iconify → modules/iconifyAPI}/js/iconify.min.js +0 -0
- data/assets/themes/j1/modules/iframeResizer/LICENSE +21 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.absolute.html +127 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.content.html +157 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.hover.html +68 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.nested.html +100 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.textarea.html +45 -0
- data/assets/themes/j1/modules/iframeResizer/examples/frame.tolerance.html +113 -0
- data/assets/themes/j1/modules/iframeResizer/examples/index.html +83 -0
- data/assets/themes/j1/modules/iframeResizer/examples/two.html +88 -0
- data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.js +1288 -0
- data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.map +1 -0
- data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.min.js +10 -0
- data/assets/themes/j1/modules/iframeResizer/js/iframeResizer.js +1390 -0
- data/assets/themes/j1/modules/iframeResizer/js/iframeResizer.map +1 -0
- data/assets/themes/j1/modules/iframeResizer/js/iframeResizer.min.js +9 -0
- data/assets/themes/j1/modules/jekyllSearch/js/simple-jekyll-search.js +624 -0
- data/assets/themes/j1/modules/jekyllSearch/js/simple-jekyll-search.min.js +6 -0
- data/assets/themes/j1/modules/jqMouseWheel/README.md +76 -0
- data/assets/themes/j1/modules/jqMouseWheel/js/jquery.mousewheel.js +221 -0
- data/assets/themes/j1/modules/jqMouseWheel/js/jquery.mousewheel.min.js +9 -0
- data/assets/themes/j1/modules/jquery/js/jquery.js +10869 -0
- data/assets/themes/j1/modules/jquery/js/jquery.min.js +2 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/LICENSE +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/README.md +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/css/justifiedGallery.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/css/justifiedGallery.min.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.3.7.0.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/js/justifiedGallery.min.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/less/.csslintrc +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v3.7.0/less/justifiedGallery.less +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/css/justifiedGallery.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/css/justifiedGallery.min.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/js/jquery.justifiedGallery.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/_versions/v4.0.0/js/jquery.justifiedGallery.min.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/justifiedGallery.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/justifiedGallery.min.css +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/theme/uno.css +1 -1
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/js/justifiedGallery.js +0 -0
- data/assets/themes/j1/{extensions/justified_gallery → modules/justifiedGallery}/js/justifiedGallery.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-fb-comment-box.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-fb-comment-box.min.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-transitions.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lg-transitions.min.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lightgallery.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/core/lightgallery.min.css +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.eot +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.svg +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.ttf +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/fonts/lg.woff +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/loading.gif +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/video-play.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/vimeo-play.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/img/youtube-play.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/animation-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/customize-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/dynamic-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/facebook-icon.svg +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/googleplus-icon.svg +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/html5-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/linked-in.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/module-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/play-button.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/responsive-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/thumb-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/touch-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/twitter-icon.svg +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/twitter.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/video1-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/zoom-w.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/icons/zoom.png +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/uno.css +1 -1
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/css/themes/uno.min.css +1 -1
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/core/lightgallery.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/core/lightgallery.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/j1/j1-video.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/j1/j1-video.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-autoplay.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-autoplay.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-fullscreen.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-fullscreen.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-hash.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-hash.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-pager.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-pager.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-share.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-share.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-thumbnail.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-thumbnail.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-video.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-video.min.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-zoom.js +0 -0
- data/assets/themes/j1/{extensions/light_gallery → modules/lightGallery}/js/modules/lg-zoom.min.js +0 -0
- data/assets/themes/j1/modules/lightbox/LICENSE +22 -0
- data/assets/themes/j1/modules/lightbox/css/lightbox.css +224 -0
- data/assets/themes/j1/modules/lightbox/css/lightbox.min.css +21 -0
- data/assets/themes/j1/modules/lightbox/css/theme/uno.css +25 -0
- data/assets/themes/j1/modules/lightbox/css/theme/uno.min.css +26 -0
- data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/close.png +0 -0
- data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/loading.gif +0 -0
- data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/next.png +0 -0
- data/{lib/starter_web/assets/images/modules/lightbox → assets/themes/j1/modules/lightbox/images}/prev.png +0 -0
- data/assets/themes/j1/modules/lightbox/js/lightbox.js +583 -0
- data/assets/themes/j1/modules/lightbox/js/lightbox.min.js +35 -0
- data/assets/themes/j1/modules/mmenuLight/css/mmenu.css +392 -0
- data/assets/themes/j1/modules/mmenuLight/css/mmenu.min.css +393 -0
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno.css +178 -0
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno.min.css +170 -0
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.js +563 -0
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.min.js +30 -0
- data/assets/themes/j1/modules/noUISlider/LICENSE +13 -0
- data/assets/themes/j1/modules/noUISlider/css/nouislider.css +260 -0
- data/assets/themes/j1/modules/noUISlider/css/nouislider.min.css +1 -0
- data/assets/themes/j1/modules/noUISlider/js/nouislider.js +2312 -0
- data/assets/themes/j1/modules/noUISlider/js/nouislider.min.js +3 -0
- data/assets/themes/j1/modules/polyfills/js/msie.js +140 -0
- data/assets/themes/j1/modules/popper/js/popper.js +2623 -0
- data/assets/themes/j1/modules/popper/js/popper.js.map +1 -0
- data/assets/themes/j1/modules/popper/js/popper.min.js +4 -0
- data/assets/themes/j1/modules/popper/js/popper.min.js.map +1 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.dark/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.light/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.monokai.dark/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.monokai.light/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.monokai/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.solarized.dark/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.solarized.light/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16.solarized/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/base16/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/colorful/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/github/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/gruvbox.dark/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/gruvbox.light/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/gruvbox/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/igorpro/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/molokai/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/monokai.sublime/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/monokai/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/pastie/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/thankful_eyes/theme.css +0 -0
- data/assets/themes/j1/{extensions → modules}/rouge/css/tulip/theme.css +0 -0
- data/assets/themes/j1/modules/tocbot/css/theme/uno.css +89 -0
- data/assets/themes/j1/modules/tocbot/css/theme/uno.min.css +89 -0
- data/assets/themes/j1/modules/tocbot/css/tocbot.css +75 -0
- data/assets/themes/j1/modules/tocbot/css/tocbot.min.css +19 -0
- data/assets/themes/j1/modules/tocbot/js/tocbot.js +19 -0
- data/assets/themes/j1/modules/tocbot/js/tocbot.min.js +19 -0
- data/assets/themes/j1/modules/twemoji/js/LICENSE +21 -0
- data/assets/themes/j1/modules/twemoji/js/picker/LICENSE +21 -0
- data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.js +275 -0
- data/assets/themes/j1/modules/twemoji/js/picker/twemoji-picker.min.js +275 -0
- data/assets/themes/j1/modules/twemoji/js/twemoji.js +589 -0
- data/assets/themes/j1/modules/twemoji/js/twemoji.min.js +25 -0
- data/assets/themes/j1/modules/util/js/js.cookie.js +163 -0
- data/assets/themes/j1/modules/util/js/lite-url.js +203 -0
- data/assets/themes/j1/modules/util/js/lite-url.min.js +7 -0
- data/assets/themes/j1/{extensions/log4javascript/log4javascript.min.js → modules/util/js/log4javascript.js} +0 -2
- data/assets/themes/j1/modules/util/js/platform.js +1260 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/city.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/city.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/fantasy.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/fantasy.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/forest.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/forest.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/sea.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/themes/sea.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/video-js.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/css/video-js.min.css +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/js/video.js +0 -0
- data/assets/themes/j1/{extensions → modules}/videojs/js/video.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/vimeo/froogaloop/js/froogaloop2.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.js +0 -0
- data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.js.map +0 -0
- data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.min.js +0 -0
- data/assets/themes/j1/{extensions → modules}/vimeo/player/js/player.min.js.map +0 -0
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +16 -10
- data/lib/starter_web/_config.yml +11 -10
- data/lib/starter_web/_data/_defaults/resources.yml +13 -13
- data/lib/starter_web/_data/blocks/banner.yml +23 -31
- data/lib/starter_web/_data/blocks/footer.yml +10 -3
- data/lib/starter_web/_data/blocks/panel.yml +21 -21
- data/lib/starter_web/_data/layouts/default.yml +10 -0
- data/lib/starter_web/_data/layouts/home.yml +7 -7
- data/lib/starter_web/_data/layouts/page.yml +15 -16
- data/lib/starter_web/_data/modules/advertising.yml +48 -0
- data/lib/starter_web/_data/modules/attics.yml +3 -39
- data/lib/starter_web/_data/modules/cookiebar.yml +2 -2
- data/lib/starter_web/_data/modules/defaults/attics.yml +17 -16
- data/lib/starter_web/_data/modules/defaults/cookie_consent.yml +75 -12
- data/lib/starter_web/_data/modules/defaults/cookiebar.yml +101 -50
- data/lib/starter_web/_data/modules/defaults/jekyll_search.yml +9 -9
- data/lib/starter_web/_data/modules/defaults/navigator.yml +56 -21
- data/lib/starter_web/_data/modules/jekyll_search.yml +3 -21
- data/lib/starter_web/_data/modules/navigator.yml +1 -1
- data/lib/starter_web/_data/modules/navigator_menu.yml +3 -0
- data/lib/starter_web/_data/modules/themer.yml +10 -11
- data/lib/starter_web/_data/resources.yml +379 -174
- data/lib/starter_web/_data/template_settings.yml +118 -6
- data/lib/starter_web/_plugins/asciidoctor-extensions/banner.rb +43 -0
- data/lib/starter_web/_plugins/asciidoctor-extensions/fab-icon-inline.rb +1 -1
- data/lib/starter_web/_plugins/asciidoctor-extensions/fas-icon-inline.rb +2 -2
- data/lib/starter_web/_plugins/asciidoctor-extensions/iconify-icon-inline.rb +2 -2
- data/lib/starter_web/_plugins/asciidoctor-extensions/mdi-icon-inline.rb +2 -2
- data/lib/starter_web/_plugins/asciidoctor-extensions/panel.rb +43 -0
- data/lib/starter_web/_plugins/asciidoctor-extensions/twitter-emoji-inline.rb +2 -2
- data/lib/starter_web/_plugins/{asciidoctor-extensions/lorem-inline.rb → lorem-inline.rb} +0 -0
- data/lib/starter_web/_plugins/minifyJS.rb +54 -0
- data/lib/starter_web/_plugins/{uglify.rb → minifyJSON.rb} +15 -9
- data/lib/starter_web/assets/images/modules/attics/aditya-joshi-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/admin-dashboard-bootstrap-1280x600.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/alex-holyoake-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/anaya-katlego-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonella-lombardi-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/admin-dashboard-bootstrap-1280x800-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/docker-1280x600-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/jekyll.1200x600-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/library-1920x800-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/signpost-1920x800-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/water-journal-1280x600.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/write-1280x600-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/brandon-mowinkel-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/building-blocks-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/cookies-1920x1200-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/daniel-jensen-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/giammarco-boscaro-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/go-up-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/ian-schneider-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/ideas-start-here-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/jason-rosewell-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/jessica-ruscello-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/library-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/matthaeus-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/nousnou-iwasaki-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/premium-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/robert-v-ruggiero-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/runner-1920x1200-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/spider-web-1920x1200-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/the-place-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/attics/welcome-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/modules/carousel/cats/cat-1.jpg +0 -0
- data/lib/starter_web/assets/images/modules/carousel/mega_cities/andreas-brucker_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/carousel/mega_cities/denys-nevozhai-1_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/carousel/mega_cities/denys-nevozhai-2_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/carousel/mega_cities/luca-bravo_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/carousel/mega_cities/thomas-tucker_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/banter-snaps_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-1_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-2-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/denys-nevozhai-2_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/emmad-mazhari_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/ethan-brooke_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/federico-rizzarelli_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/gints-gailis_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/johan-mouchet_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/luca-bravo_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/oskars-sylwan_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/steven-diaz_b.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/thomas-tucker-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/gallery/mega_cities/thomas-tucker_b.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/bootstrap-1920x1000-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/cards-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/emojies-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/icon-fonts-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/images-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/puzzle-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/tables-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/themes-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/typography-1920x1280-bw.webp +0 -0
- data/lib/starter_web/assets/videos/headers/still/underground-broadway.webp +0 -0
- data/lib/starter_web/assets/videos/headers/still/victoria-oskolovich-on-vimeo.webp +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1-template.adoc.erb +5 -6
- data/lib/starter_web/collections/posts/public/featured/_posts/2018-05-01-confusion-about-base-url.adoc +2 -2
- data/lib/starter_web/collections/posts/public/featured/_posts/2019-05-01-top-open-source-static-site-generators.adoc +19 -19
- data/lib/starter_web/collections/posts/public/featured/_posts/2019-06-01-about-cookies.adoc +38 -42
- data/lib/starter_web/collections/posts/public/series/_posts/2018-11-01-docker-using-shared-folders.adoc +4 -7
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +1 -3
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +3 -3
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +4 -4
- data/lib/starter_web/index.html +11 -10
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/about/about_site.adoc +1 -1
- data/lib/starter_web/pages/public/about/become_a_patron.adoc +1 -1
- data/lib/starter_web/pages/public/blog/navigator/archive.html +24 -18
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +39 -34
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +43 -30
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +29 -29
- data/lib/starter_web/pages/public/blog/navigator/index.html +3 -3
- data/lib/starter_web/pages/public/learn/examples/floating_ad.adoc +221 -0
- data/lib/starter_web/pages/public/learn/{floating_sidebar.adoc → examples/floating_div.adoc} +60 -50
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/000_includes/parts.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/100_meet_and_greet_jekyll.adoc +9 -4
- data/lib/starter_web/pages/public/learn/roundtrip/000_bs_tour.1.asciidoc +1 -2
- data/lib/starter_web/pages/public/learn/roundtrip/000_bs_tour.adoc +1 -2
- data/lib/starter_web/pages/public/learn/roundtrip/000_bs_tour_api.adoc +18 -20
- data/lib/starter_web/pages/public/learn/roundtrip/000_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/000_includes/documents/410_table_3_column.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/000_includes/documents/419_advanced_modals_html.asciidoc +5 -5
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +3 -3
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +2 -2
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +8 -4
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +37 -46
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +3 -3
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +10 -11
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +40 -40
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +20 -22
- data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/000_includes/attributes.asciidoc +69 -0
- data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/000_includes/documents/100_buttons.asciidoc +170 -0
- data/lib/starter_web/pages/public/learn/roundtrip/510_mdb_preview/mdb_previewer.adoc +52 -0
- data/lib/starter_web/pages/public/learn/vtutorials/000_includes/attributes.asciidoc +3 -3
- data/lib/starter_web/pages/public/learn/vtutorials/000_includes/documents/410_table_3_column.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/vtutorials/000_includes/documents/419_advanced_modals_html.asciidoc +5 -5
- data/lib/starter_web/pages/public/learn/whats_up.adoc +3 -3
- data/lib/starter_web/pages/public/legal/en/000_copyright.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/100_impress.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +1 -1
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +55 -49
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/100_absolute_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/110_bs_grid_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/120_relative_sizes.asciidoc +1 -41
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/200_rotate.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/300_flip.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/400_spin_pulsed.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/500_bw_color_palette.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/510_bs_color_palette.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/600_md_color_palette.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/601_md_color_palette_indigo.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/602_md_color_palette_pink.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/100_bs_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/100_relative_sizes.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/200_rotate.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/300_flip.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/twitter_emoji/400_spin_pulsed.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +674 -865
- data/lib/starter_web/pages/public/previewer/iframer.adoc +18 -16
- data/lib/starter_web/pages/public/previewer/justified_gallery.html +1 -1
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +3 -3
- data/lib/starter_web/pages/public/site_search.adoc +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +294 -208
- data/assets/data/colors.json +0 -42
- data/assets/data/cookie_consent.html +0 -223
- data/assets/data/font_sizes.json +0 -42
- data/assets/data/messages.yml +0 -131
- data/assets/data/search.yml +0 -131
- data/assets/themes/j1/adapter/js/cookie_consent.js +0 -269
- data/assets/themes/j1/core/css/custom.scss +0 -28
- data/assets/themes/j1/core/css/globals.css +0 -14523
- data/assets/themes/j1/core/css/globals.min.css +0 -1
- data/assets/themes/j1/core/css/uno.scss +0 -28
- data/assets/themes/j1/core/css/vendor.scss +0 -28
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.absolute.html +0 -86
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.content.html +0 -58
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.hover.html +0 -51
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.nested.html +0 -68
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.textarea.html +0 -46
- data/assets/themes/j1/extensions/iframe_resizer/examples/frame.tolerance.html +0 -79
- data/assets/themes/j1/extensions/iframe_resizer/examples/index.html +0 -70
- data/assets/themes/j1/extensions/iframe_resizer/examples/two.html +0 -71
- data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.js +0 -1104
- data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.map +0 -1
- data/assets/themes/j1/extensions/iframe_resizer/js/client/iframeResizer.contentWindow.min.js +0 -10
- data/assets/themes/j1/extensions/log4javascript/log4javascript.js +0 -5826
- data/lib/starter_web/_data/modules/cookie_consent.yml +0 -128
- data/lib/starter_web/assets/images/modules/attics/aditya-joshi-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/admin-dashboard-bootstrap-1280x600.png +0 -0
- data/lib/starter_web/assets/images/modules/attics/alex-holyoake-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/anaya-katlego-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonella-lombardi-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/admin-dashboard-bootstrap-1280x800-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/docker-1280x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/jekyll.1200x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/library-1920x800-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/signpost-1920x800-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/water-journal-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/write-1280x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/brandon-mowinkel-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/building-blocks-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/cookies-1920x1200-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/daniel-jensen-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/giammarco-boscaro-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/go-up-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/ian-schneider-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/ideas-start-here-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/jason-rosewell-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/jessica-ruscello-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/library-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mu-Vf9gbsLZyf0-unsplash.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280-v.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/matthaeus-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/nousnou-iwasaki-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/premium-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/robert-v-ruggiero-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/runner-1920x1200-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/spider-web-1920x1200-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/the-place-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/welcome-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/bootstrap-1920x1000-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/cards-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/emojies-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/icon-fonts-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/images-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/puzzle-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/tables-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/themes-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/roundtrip/typography-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/videos/headers/still/underground-broadway.png +0 -0
- data/lib/starter_web/assets/videos/headers/still/victoria-oskolovich-on-vimeo.png +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["iframeResizer.contentWindow.js"],"names":["undefined","window","autoResize","base","bodyBackground","bodyMargin","bodyMarginStr","bodyObserver","bodyPadding","calculateWidth","doubleEventList","resize","click","eventCancelTimer","firstRun","height","heightCalcModeDefault","heightCalcMode","initLock","initMsg","inPageLinks","interval","intervalTimer","logging","msgID","msgIdLen","length","myID","resetRequiredMethods","max","min","bodyScroll","documentElementScroll","resizeFrom","sendPermit","target","parent","targetOriginDefault","tolerance","triggerLocked","triggerLockedTimer","throttledTimer","width","widthCalcModeDefault","widthCalcMode","win","onMessage","warn","onReady","onPageInfo","customCalcMethods","document","documentElement","offsetHeight","body","scrollWidth","eventHandlersByName","passiveSupported","options","Object","create","passive","get","addEventListener","noop","removeEventListener","error","func","context","args","result","timeout","previous","getNow","Date","now","getTime","getHeight","bodyOffset","getComputedStyle","offset","scrollHeight","custom","documentElementOffset","Math","apply","getAllMeasurements","grow","lowestElement","getMaxElement","getAllElements","taggedElement","getTaggedElements","getWidth","offsetWidth","scroll","rightMostElement","sizeIFrameThrottled","sizeIFrame","remaining","this","arguments","clearTimeout","setTimeout","later","event","processRequestFromParent","init","data","source","reset","log","triggerReset","sendSize","moveToAnchor","findTarget","getData","inPageLink","pageInfo","msgBody","JSON","parse","message","getMessageType","split","substr","indexOf","isInitMsg","true","false","callFromParent","messageType","module","exports","jQuery","prototype","chkLateLoaded","el","evt","capitalizeFirstLetter","string","charAt","toUpperCase","slice","formatLogMsg","msg","console","strBool","str","Number","enable","readDataFromParent","location","href","setupCustomCalcMethods","calcMode","calcFunc","iFrameResizer","constructor","stringify","keys","forEach","depricate","targetOrigin","heightCalculationMethod","widthCalculationMethod","readData","readDataFromPage","setBodyStyle","attr","value","chkCSS","setMargin","clearFix","createElement","style","clear","display","appendChild","injectClearFixIntoBodyElement","checkHeightMode","checkWidthMode","parentIFrame","startEventListeners","manageEventListeners","disconnect","clearInterval","sendMsg","close","getId","getPageInfo","callback","hash","resetIFrame","scrollTo","x","y","scrollToOffset","sendMessage","setHeightCalculationMethod","setWidthCalculationMethod","setTargetOrigin","size","customHeight","customWidth","getElementPosition","elPosition","getBoundingClientRect","pagePosition","pageXOffset","scrollLeft","pageYOffset","scrollTop","parseInt","left","top","jumpPosition","hashData","decodeURIComponent","getElementById","getElementsByName","checkLocationHash","bindAnchors","Array","call","querySelectorAll","getAttribute","e","preventDefault","setupInPageLinks","key","splitName","name","manageTriggerEvent","listener","add","eventName","handleEvent","eventType","remove","eventNames","map","method","checkCalcMode","calcModeDefault","modes","type","forceIntervalTimer","MutationObserver","WebKitMutationObserver","initInterval","addImageLoadListners","mutation","addImageLoadListener","element","complete","src","imageLoaded","imageError","elements","push","attributeName","removeImageLoadListener","splice","removeFromArray","imageEventTriggered","typeDesc","mutationObserved","mutations","observer","querySelector","observe","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","createMutationObserver","setupBodyMutationObserver","setupMutationObserver","setInterval","abs","prop","retVal","defaultView","side","elementsLength","elVal","maxVal","Side","timer","i","chkEventThottle","dimention","tag","triggerEvent","triggerEventDesc","currentHeight","currentWidth","checkTolarance","a","b","lockTrigger","resetPage","hcm","postMessage","readyState"],"mappings":";;;;;;;;CAWC,SAAWA,GACV,GAAsB,oBAAXC,OAAX,CAEA,IAAIC,GAAa,EACfC,EAAO,GACPC,EAAiB,GACjBC,EAAa,EACbC,EAAgB,GAChBC,EAAe,KACfC,EAAc,GACdC,GAAiB,EACjBC,EAAkB,CAAEC,OAAQ,EAAGC,MAAO,GACtCC,EAAmB,IACnBC,GAAW,EACXC,EAAS,EACTC,EAAwB,aACxBC,EAAiBD,EACjBE,GAAW,EACXC,EAAU,GACVC,EAAc,GACdC,EAAW,GACXC,EAAgB,KAChBC,GAAU,EACVC,EAAQ,gBACRC,EAAWD,EAAME,OACjBC,EAAO,GACPC,EAAuB,CACrBC,IAAK,EACLC,IAAK,EACLC,WAAY,EACZC,sBAAuB,GAEzBC,EAAa,QACbC,GAAa,EACbC,EAASlC,OAAOmC,OAChBC,EAAsB,IACtBC,EAAY,EACZC,GAAgB,EAChBC,EAAqB,KACrBC,EAAiB,GACjBC,EAAQ,EACRC,EAAuB,SACvBC,EAAgBD,EAChBE,EAAM5C,OACN6C,EAAY,WACVC,GAAK,mCAEPC,EAAU,aACVC,EAAa,aACbC,EAAoB,CAClBnC,OAAQ,WAEN,OADAgC,GAAK,kDACEI,SAASC,gBAAgBC,cAElCX,MAAO,WAE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,EAAUC,EAAO,MAo8BzB,SAAS4C,GAASuL,EAAcC,EAAkB9F,EAAcC,GAQrDrK,GAAiBiQ,KAAgB9R,EAgBxCqG,GAAI,4BAA8ByL,IAtB5BA,IAAgB,CAAE1L,MAAO,EAAGkM,UAAW,EAAGrM,KAAM,IACpDI,GAAI,kBAAoB0L,GAUL,SAAjBD,EACFtM,GAAWsM,EAAcC,EAAkB9F,EAAcC,GAEzD3G,EACEuM,EACAC,EACA9F,EACAC,IAQR,SAASmG,KACFxQ,IACHA,GAAgB,EAChBwE,GAAI,0BAENT,aAAa9D,GACbA,EAAqB+D,WAAW,WAC9BhE,GAAgB,EAChBwE,GAAI,0BACJA,GAAI,OACHlG,GAGL,SAASmG,GAAawL,GACpBzR,EAAS8D,EAAU5D,KACnByB,EAAQmD,EAASjD,KAEjB+I,GAAQ5K,EAAQ2B,EAAO8P,GAGzB,SAASvG,GAAYwG,GACnB,IAAIQ,EAAMhS,EACVA,EAAiBD,EAEjB+F,GAAI,wBAA0B0L,GAC9BM,KACA/L,GAAa,SAEb/F,EAAiBgS,EAGnB,SAAStH,GAAQ5K,EAAQ2B,EAAO8P,EAAcvJ,EAAKkB,GASjD,IAEIzC,GAYA,IAASxF,IArBPlC,IAAcmK,EAChBA,EAAe9H,EAEf0E,GAAI,yBAA2BoD,GAcjCpD,GAAI,kCARFW,EACE/F,EACA,KAHOZ,EAAS,IAAM2B,GAKtB,IACA8P,GACCxS,IAAciJ,EAAM,IAAMA,EAAM,KAEY,KACjD9G,EAAO+Q,YAAY1R,EAAQkG,EAASyC,IAoHxC,SAAS3B,KACH,YAAcrF,SAASgQ,YACzBlT,OAAOmC,OAAO8Q,YAAY,4BAA6B,MAnvC5D","file":"iframeResizer.contentWindow.min.js"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v4.2.11 - 2020-06-02
|
2
|
+
* Desc: Include this file in any page being loaded into an iframe
|
3
|
+
* to force the iframe to resize to the content size.
|
4
|
+
* Requires: iframeResizer.min.js on host page.
|
5
|
+
* Copyright: (c) 2020 David J. Bradshaw - dave@bradshaw.net
|
6
|
+
* License: MIT
|
7
|
+
*/
|
8
|
+
|
9
|
+
!function(d){if("undefined"!=typeof window){var n=!0,o=10,i="",r=0,a="",t=null,u="",c=!1,s={resize:1,click:1},l=128,f=!0,m=1,h="bodyOffset",g=h,p=!0,v="",y={},b=32,w=null,T=!1,E="[iFrameSizer]",O=E.length,S="",M={max:1,min:1,bodyScroll:1,documentElementScroll:1},I="child",N=!0,A=window.parent,C="*",z=0,k=!1,e=null,R=16,x=1,L="scroll",F=L,P=window,D=function(){re("onMessage function not defined")},j=function(){},q=function(){},H={height:function(){return re("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return re("Custom width calculation function not defined"),document.body.scrollWidth}},W={},B=!1;try{var J=Object.create({},{passive:{get:function(){B=!0}}});window.addEventListener("test",ee,J),window.removeEventListener("test",ee,J)}catch(e){}var U,V,K,Q,X,Y,G=Date.now||function(){return(new Date).getTime()},Z={bodyOffset:function(){return document.body.offsetHeight+pe("marginTop")+pe("marginBottom")},offset:function(){return Z.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return H.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,ye(Z))},min:function(){return Math.min.apply(null,ye(Z))},grow:function(){return Z.max()},lowestElement:function(){return Math.max(Z.bodyOffset()||Z.documentElementOffset(),ve("bottom",we()))},taggedElement:function(){return be("bottom","data-iframe-height")}},$={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return H.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max($.bodyScroll(),$.documentElementScroll())},max:function(){return Math.max.apply(null,ye($))},min:function(){return Math.min.apply(null,ye($))},rightMostElement:function(){return ve("right",we())},taggedElement:function(){return be("right","data-iframe-width")}},_=(U=Te,X=null,Y=0,function(){var e=G(),t=R-(e-(Y=Y||e));return V=this,K=arguments,t<=0||R<t?(X&&(clearTimeout(X),X=null),Y=e,Q=U.apply(V,K),X||(V=K=null)):X=X||setTimeout(Ee,t),Q});te(window,"message",function(t){var n={init:function(){v=t.data,A=t.source,ae(),f=!1,setTimeout(function(){p=!1},l)},reset:function(){p?ie("Page reset ignored by init"):(ie("Page size reset by host page"),Me("resetPage"))},resize:function(){Oe("resizeParent","Parent window requested size check")},moveToAnchor:function(){y.findTarget(i())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=i();ie("PageInfoFromParent called from parent: "+e),q(JSON.parse(e)),ie(" --")},message:function(){var e=i();ie("onMessage called from parent: "+e),D(JSON.parse(e)),ie(" --")}};function o(){return t.data.split("]")[1].split(":")[0]}function i(){return t.data.substr(t.data.indexOf(":")+1)}function r(){return t.data.split(":")[2]in{true:1,false:1}}function e(){var e=o();e in n?n[e]():("undefined"==typeof module||!module.exports)&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype||r()||re("Unexpected message ("+t.data+")")}E===(""+t.data).substr(0,O)&&(!1===f?e():r()?n.init():ie('Ignored message of type "'+o()+'". Received before initialization.'))}),te(window,"readystatechange",Ae),Ae()}function ee(){}function te(e,t,n,o){e.addEventListener(t,n,!!B&&(o||{}))}function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function oe(e){return E+"["+S+"] "+e}function ie(e){T&&"object"==typeof window.console&&console.log(oe(e))}function re(e){"object"==typeof window.console&&console.warn(oe(e))}function ae(){!function(){function e(e){return"true"===e}var t=v.substr(O).split(":");S=t[0],r=d!==t[1]?Number(t[1]):r,c=d!==t[2]?e(t[2]):c,T=d!==t[3]?e(t[3]):T,b=d!==t[4]?Number(t[4]):b,n=d!==t[6]?e(t[6]):n,a=t[7],g=d!==t[8]?t[8]:g,i=t[9],u=t[10],z=d!==t[11]?Number(t[11]):z,y.enable=d!==t[12]&&e(t[12]),I=d!==t[13]?t[13]:I,F=d!==t[14]?t[14]:F}(),ie("Initialising iFrame ("+location.href+")"),function(){function e(e,t){return"function"==typeof e&&(ie("Setup custom "+t+"CalcMethod"),H[t]=e,e="custom"),e}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(function(){var e=window.iFrameResizer;ie("Reading data from page: "+JSON.stringify(e)),Object.keys(e).forEach(ue,e),D="onMessage"in e?e.onMessage:D,j="onReady"in e?e.onReady:j,C="targetOrigin"in e?e.targetOrigin:C,g="heightCalculationMethod"in e?e.heightCalculationMethod:g,F="widthCalculationMethod"in e?e.widthCalculationMethod:F}(),g=e(g,"height"),F=e(F,"width"));ie("TargetOrigin for parent set to: "+C)}(),function(){d===a&&(a=r+"px");ce("margin",function(e,t){-1!==t.indexOf("-")&&(re("Negative CSS value ignored for "+e),t="");return t}("margin",a))}(),ce("background",i),ce("padding",u),function(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}(),fe(),me(),document.documentElement.style.height="",document.body.style.height="",ie('HTML & body height set to "auto"'),ie("Enable public methods"),P.parentIFrame={autoResize:function(e){return!0===e&&!1===n?(n=!0,he()):!1===e&&!0===n&&(n=!1,de("remove"),null!==t&&t.disconnect(),clearInterval(w)),Ne(0,0,"autoResize",JSON.stringify(n)),n},close:function(){Ne(0,0,"close")},getId:function(){return S},getPageInfo:function(e){"function"==typeof e?(q=e,Ne(0,0,"pageInfo")):(q=function(){},Ne(0,0,"pageInfoStop"))},moveToAnchor:function(e){y.findTarget(e)},reset:function(){Ie("parentIFrame.reset")},scrollTo:function(e,t){Ne(t,e,"scrollTo")},scrollToOffset:function(e,t){Ne(t,e,"scrollToOffset")},sendMessage:function(e,t){Ne(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){g=e,fe()},setWidthCalculationMethod:function(e){F=e,me()},setTargetOrigin:function(e){ie("Set targetOrigin: "+e),C=e},size:function(e,t){Oe("size","parentIFrame.size("+((e||"")+(t?","+t:""))+")",e,t)}},he(),y=function(){function r(e){var t=e.getBoundingClientRect(),n={x:window.pageXOffset!==d?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==d?window.pageYOffset:document.documentElement.scrollTop};return{x:parseInt(t.left,10)+parseInt(n.x,10),y:parseInt(t.top,10)+parseInt(n.y,10)}}function t(e){var t,n=e.split("#")[1]||e,o=decodeURIComponent(n),i=document.getElementById(o)||document.getElementsByName(o)[0];d!==i?(t=r(i),ie("Moving to in page link (#"+n+") at x: "+t.x+" y: "+t.y),Ne(t.y,t.x,"scrollToOffset")):(ie("In page link (#"+n+") not found in iFrame, so sending to parent"),Ne(0,0,"inPageLink","#"+n))}function e(){""!==location.hash&&"#"!==location.hash&&t(location.href)}function n(){Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),function(e){"#"!==e.getAttribute("href")&&te(e,"click",function(e){e.preventDefault(),t(this.getAttribute("href"))})})}y.enable?Array.prototype.forEach&&document.querySelectorAll?(ie("Setting up location.hash handlers"),n(),te(window,"hashchange",e),setTimeout(e,l)):re("In page linking not fully supported in this browser! (See README.md for IE8 workaround)"):ie("In page linking not enabled");return{findTarget:t}}(),Oe("init","Init message from host page"),j()}function ue(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],re("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function ce(e,t){d!==t&&""!==t&&"null"!==t&&ie("Body "+e+' set to "'+(document.body.style[e]=t)+'"')}function se(n){var e={add:function(e){function t(){Oe(n.eventName,n.eventType)}W[e]=t,te(window,e,t,{passive:!0})},remove:function(e){var t=W[e];delete W[e],function(e,t,n){e.removeEventListener(t,n,!1)}(window,e,t)}};n.eventNames&&Array.prototype.map?(n.eventName=n.eventNames[0],n.eventNames.map(e[n.method])):e[n.method](n.eventName),ie(ne(n.method)+" event listener: "+n.eventType)}function de(e){se({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),se({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),se({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),se({method:e,eventType:"Input",eventName:"input"}),se({method:e,eventType:"Mouse Up",eventName:"mouseup"}),se({method:e,eventType:"Mouse Down",eventName:"mousedown"}),se({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),se({method:e,eventType:"Print",eventName:["afterprint","beforeprint"]}),se({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),se({method:e,eventType:"Touch Start",eventName:"touchstart"}),se({method:e,eventType:"Touch End",eventName:"touchend"}),se({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),se({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),se({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),se({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===I&&se({method:e,eventType:"IFrame Resized",eventName:"resize"})}function le(e,t,n,o){return t!==e&&(e in n||(re(e+" is not a valid option for "+o+"CalculationMethod."),e=t),ie(o+' calculation method set to "'+e+'"')),e}function fe(){g=le(g,h,Z,"height")}function me(){F=le(F,L,$,"width")}function he(){!0===n?(de("add"),function(){var e=b<0;window.MutationObserver||window.WebKitMutationObserver?e?ge():t=function(){function t(e){function t(e){!1===e.complete&&(ie("Attach listeners to "+e.src),e.addEventListener("load",i,!1),e.addEventListener("error",r,!1),u.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function o(e){ie("Remove listeners from "+e.src),e.removeEventListener("load",i,!1),e.removeEventListener("error",r,!1),function(e){u.splice(u.indexOf(e),1)}(e)}function n(e,t,n){o(e.target),Oe(t,n+": "+e.target.src,d,d)}function i(e){n(e,"imageLoad","Image loaded")}function r(e){n(e,"imageLoadFailed","Image load failed")}function a(e){Oe("mutationObserver","mutationObserver: "+e[0].target+" "+e[0].type),e.forEach(t)}var u=[],c=window.MutationObserver||window.WebKitMutationObserver,s=function(){var e=document.querySelector("body");return s=new c(a),ie("Create body MutationObserver"),s.observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),s}();return{disconnect:function(){"disconnect"in s&&(ie("Disconnect body MutationObserver"),s.disconnect(),u.forEach(o))}}}():(ie("MutationObserver not supported in this browser!"),ge())}()):ie("Auto Resize disabled")}function ge(){0!==b&&(ie("setInterval: "+b+"ms"),w=setInterval(function(){Oe("interval","setInterval: "+b)},Math.abs(b)))}function pe(e,t){var n=0;return t=t||document.body,n=null!==(n=document.defaultView.getComputedStyle(t,null))?n[e]:0,parseInt(n,o)}function ve(e,t){for(var n=t.length,o=0,i=0,r=ne(e),a=G(),u=0;u<n;u++)i<(o=t[u].getBoundingClientRect()[e]+pe("margin"+r,t[u]))&&(i=o);return a=G()-a,ie("Parsed "+n+" HTML elements"),ie("Element position calculated in "+a+"ms"),function(e){R/2<e&&ie("Event throttle increased to "+(R=2*e)+"ms")}(a),i}function ye(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function be(e,t){var n=document.querySelectorAll("["+t+"]");return 0===n.length&&(re("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),ve(e,n)}function we(){return document.querySelectorAll("body *")}function Te(e,t,n,o){var i,r;function a(e,t){return!(Math.abs(e-t)<=z)}i=d!==n?n:Z[g](),r=d!==o?o:$[F](),a(m,i)||c&&a(x,r)||"init"===e?(Se(),Ne(m=i,x=r,e)):e in{init:1,interval:1,size:1}||!(g in M||c&&F in M)?e in{interval:1}||ie("No change in size detected"):Ie(t)}function Ee(){Y=G(),X=null,Q=U.apply(V,K),X||(V=K=null)}function Oe(e,t,n,o){k&&e in s?ie("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||ie("Trigger event: "+t),"init"===e?Te(e,t,n,o):_(e,t,n,o))}function Se(){k||(k=!0,ie("Trigger event lock on")),clearTimeout(e),e=setTimeout(function(){k=!1,ie("Trigger event lock off"),ie("--")},l)}function Me(e){m=Z[g](),x=$[F](),Ne(m,x,e)}function Ie(e){var t=g;g=h,ie("Reset trigger event: "+e),Se(),Me("reset"),g=t}function Ne(e,t,n,o,i){var r;!0===N&&(d===i?i=C:ie("Message targetOrigin: "+i),ie("Sending message to host page ("+(r=S+":"+(e+":"+t)+":"+n+(d!==o?":"+o:""))+")"),A.postMessage(E+r,i))}function Ae(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}();
|
10
|
+
//# sourceMappingURL=iframeResizer.contentWindow.map
|
@@ -0,0 +1,1390 @@
|
|
1
|
+
/*
|
2
|
+
* File: iframeResizer.js
|
3
|
+
* Desc: Force iframes to size to content.
|
4
|
+
* Requires: iframeResizer.contentWindow.js to be loaded into the target frame.
|
5
|
+
* Doc: https://github.com/davidjbradshaw/iframe-resizer
|
6
|
+
* Author: David J. Bradshaw - dave@bradshaw.net
|
7
|
+
* Contributor: Jure Mav - jure.mav@gmail.com
|
8
|
+
* Contributor: Reed Dadoune - reed@dadoune.com
|
9
|
+
*/
|
10
|
+
|
11
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names
|
12
|
+
;(function (undefined) {
|
13
|
+
if (typeof window === 'undefined') return // don't run for server side render
|
14
|
+
|
15
|
+
var count = 0,
|
16
|
+
logEnabled = false,
|
17
|
+
hiddenCheckEnabled = false,
|
18
|
+
msgHeader = 'message',
|
19
|
+
msgHeaderLen = msgHeader.length,
|
20
|
+
msgId = '[iFrameSizer]', // Must match iframe msg ID
|
21
|
+
msgIdLen = msgId.length,
|
22
|
+
pagePosition = null,
|
23
|
+
requestAnimationFrame = window.requestAnimationFrame,
|
24
|
+
resetRequiredMethods = {
|
25
|
+
max: 1,
|
26
|
+
scroll: 1,
|
27
|
+
bodyScroll: 1,
|
28
|
+
documentElementScroll: 1
|
29
|
+
},
|
30
|
+
settings = {},
|
31
|
+
timer = null,
|
32
|
+
defaults = {
|
33
|
+
autoResize: true,
|
34
|
+
bodyBackground: null,
|
35
|
+
bodyMargin: null,
|
36
|
+
bodyMarginV1: 8,
|
37
|
+
bodyPadding: null,
|
38
|
+
checkOrigin: true,
|
39
|
+
inPageLinks: false,
|
40
|
+
enablePublicMethods: true,
|
41
|
+
heightCalculationMethod: 'bodyOffset',
|
42
|
+
id: 'iFrameResizer',
|
43
|
+
interval: 32,
|
44
|
+
log: false,
|
45
|
+
maxHeight: Infinity,
|
46
|
+
maxWidth: Infinity,
|
47
|
+
minHeight: 0,
|
48
|
+
minWidth: 0,
|
49
|
+
resizeFrom: 'parent',
|
50
|
+
scrolling: false,
|
51
|
+
sizeHeight: true,
|
52
|
+
sizeWidth: false,
|
53
|
+
warningTimeout: 5000,
|
54
|
+
tolerance: 0,
|
55
|
+
widthCalculationMethod: 'scroll',
|
56
|
+
onClose: function () {
|
57
|
+
return true
|
58
|
+
},
|
59
|
+
onClosed: function () {},
|
60
|
+
onInit: function () {},
|
61
|
+
onMessage: function () {
|
62
|
+
warn('onMessage function not defined')
|
63
|
+
},
|
64
|
+
onResized: function () {},
|
65
|
+
onScroll: function () {
|
66
|
+
return true
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
function getMutationObserver() {
|
71
|
+
return (
|
72
|
+
window.MutationObserver ||
|
73
|
+
window.WebKitMutationObserver ||
|
74
|
+
window.MozMutationObserver
|
75
|
+
)
|
76
|
+
}
|
77
|
+
|
78
|
+
function addEventListener(el, evt, func) {
|
79
|
+
el.addEventListener(evt, func, false)
|
80
|
+
}
|
81
|
+
|
82
|
+
function removeEventListener(el, evt, func) {
|
83
|
+
el.removeEventListener(evt, func, false)
|
84
|
+
}
|
85
|
+
|
86
|
+
function setupRequestAnimationFrame() {
|
87
|
+
var vendors = ['moz', 'webkit', 'o', 'ms']
|
88
|
+
var x
|
89
|
+
|
90
|
+
// Remove vendor prefixing if prefixed and break early if not
|
91
|
+
for (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {
|
92
|
+
requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']
|
93
|
+
}
|
94
|
+
|
95
|
+
if (!requestAnimationFrame) {
|
96
|
+
log('setup', 'RequestAnimationFrame not supported')
|
97
|
+
} else {
|
98
|
+
// Firefox extension content-scripts have a globalThis object that is not the same as window.
|
99
|
+
// Binding `requestAnimationFrame` to window allows the function to work and prevents errors
|
100
|
+
// being thrown when run in that context, and should be a no-op in every other context.
|
101
|
+
requestAnimationFrame = requestAnimationFrame.bind(window)
|
102
|
+
}
|
103
|
+
}
|
104
|
+
|
105
|
+
function getMyID(iframeId) {
|
106
|
+
var retStr = 'Host page: ' + iframeId
|
107
|
+
|
108
|
+
if (window.top !== window.self) {
|
109
|
+
if (window.parentIFrame && window.parentIFrame.getId) {
|
110
|
+
retStr = window.parentIFrame.getId() + ': ' + iframeId
|
111
|
+
} else {
|
112
|
+
retStr = 'Nested host page: ' + iframeId
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
return retStr
|
117
|
+
}
|
118
|
+
|
119
|
+
function formatLogHeader(iframeId) {
|
120
|
+
return msgId + '[' + getMyID(iframeId) + ']'
|
121
|
+
}
|
122
|
+
|
123
|
+
function isLogEnabled(iframeId) {
|
124
|
+
return settings[iframeId] ? settings[iframeId].log : logEnabled
|
125
|
+
}
|
126
|
+
|
127
|
+
function log(iframeId, msg) {
|
128
|
+
output('log', iframeId, msg, isLogEnabled(iframeId))
|
129
|
+
}
|
130
|
+
|
131
|
+
function info(iframeId, msg) {
|
132
|
+
output('info', iframeId, msg, isLogEnabled(iframeId))
|
133
|
+
}
|
134
|
+
|
135
|
+
function warn(iframeId, msg) {
|
136
|
+
output('warn', iframeId, msg, true)
|
137
|
+
}
|
138
|
+
|
139
|
+
function output(type, iframeId, msg, enabled) {
|
140
|
+
if (true === enabled && 'object' === typeof window.console) {
|
141
|
+
// eslint-disable-next-line no-console
|
142
|
+
console[type](formatLogHeader(iframeId), msg)
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
function iFrameListener(event) {
|
147
|
+
function resizeIFrame() {
|
148
|
+
function resize() {
|
149
|
+
setSize(messageData)
|
150
|
+
setPagePosition(iframeId)
|
151
|
+
on('onResized', messageData)
|
152
|
+
}
|
153
|
+
|
154
|
+
ensureInRange('Height')
|
155
|
+
ensureInRange('Width')
|
156
|
+
|
157
|
+
syncResize(resize, messageData, 'init')
|
158
|
+
}
|
159
|
+
|
160
|
+
function processMsg() {
|
161
|
+
var data = msg.substr(msgIdLen).split(':')
|
162
|
+
var height = data[1] ? parseInt(data[1], 10) : 0
|
163
|
+
var iframe = settings[data[0]] && settings[data[0]].iframe
|
164
|
+
var compStyle = getComputedStyle(iframe)
|
165
|
+
|
166
|
+
return {
|
167
|
+
iframe: iframe,
|
168
|
+
id: data[0],
|
169
|
+
height: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),
|
170
|
+
width: data[2],
|
171
|
+
type: data[3]
|
172
|
+
}
|
173
|
+
}
|
174
|
+
|
175
|
+
function getPaddingEnds(compStyle) {
|
176
|
+
if (compStyle.boxSizing !== 'border-box') {
|
177
|
+
return 0
|
178
|
+
}
|
179
|
+
var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0
|
180
|
+
var bot = compStyle.paddingBottom
|
181
|
+
? parseInt(compStyle.paddingBottom, 10)
|
182
|
+
: 0
|
183
|
+
return top + bot
|
184
|
+
}
|
185
|
+
|
186
|
+
function getBorderEnds(compStyle) {
|
187
|
+
if (compStyle.boxSizing !== 'border-box') {
|
188
|
+
return 0
|
189
|
+
}
|
190
|
+
var top = compStyle.borderTopWidth
|
191
|
+
? parseInt(compStyle.borderTopWidth, 10)
|
192
|
+
: 0
|
193
|
+
var bot = compStyle.borderBottomWidth
|
194
|
+
? parseInt(compStyle.borderBottomWidth, 10)
|
195
|
+
: 0
|
196
|
+
return top + bot
|
197
|
+
}
|
198
|
+
|
199
|
+
function ensureInRange(Dimension) {
|
200
|
+
var max = Number(settings[iframeId]['max' + Dimension]),
|
201
|
+
min = Number(settings[iframeId]['min' + Dimension]),
|
202
|
+
dimension = Dimension.toLowerCase(),
|
203
|
+
size = Number(messageData[dimension])
|
204
|
+
|
205
|
+
log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max)
|
206
|
+
|
207
|
+
if (size < min) {
|
208
|
+
size = min
|
209
|
+
log(iframeId, 'Set ' + dimension + ' to min value')
|
210
|
+
}
|
211
|
+
|
212
|
+
if (size > max) {
|
213
|
+
size = max
|
214
|
+
log(iframeId, 'Set ' + dimension + ' to max value')
|
215
|
+
}
|
216
|
+
|
217
|
+
messageData[dimension] = '' + size
|
218
|
+
}
|
219
|
+
|
220
|
+
function isMessageFromIFrame() {
|
221
|
+
function checkAllowedOrigin() {
|
222
|
+
function checkList() {
|
223
|
+
var i = 0,
|
224
|
+
retCode = false
|
225
|
+
|
226
|
+
log(
|
227
|
+
iframeId,
|
228
|
+
'Checking connection is from allowed list of origins: ' +
|
229
|
+
checkOrigin
|
230
|
+
)
|
231
|
+
|
232
|
+
for (; i < checkOrigin.length; i++) {
|
233
|
+
if (checkOrigin[i] === origin) {
|
234
|
+
retCode = true
|
235
|
+
break
|
236
|
+
}
|
237
|
+
}
|
238
|
+
return retCode
|
239
|
+
}
|
240
|
+
|
241
|
+
function checkSingle() {
|
242
|
+
var remoteHost = settings[iframeId] && settings[iframeId].remoteHost
|
243
|
+
log(iframeId, 'Checking connection is from: ' + remoteHost)
|
244
|
+
return origin === remoteHost
|
245
|
+
}
|
246
|
+
|
247
|
+
return checkOrigin.constructor === Array ? checkList() : checkSingle()
|
248
|
+
}
|
249
|
+
|
250
|
+
var origin = event.origin,
|
251
|
+
checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin
|
252
|
+
|
253
|
+
if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {
|
254
|
+
throw new Error(
|
255
|
+
'Unexpected message received from: ' +
|
256
|
+
origin +
|
257
|
+
' for ' +
|
258
|
+
messageData.iframe.id +
|
259
|
+
'. Message was: ' +
|
260
|
+
event.data +
|
261
|
+
'. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'
|
262
|
+
)
|
263
|
+
}
|
264
|
+
|
265
|
+
return true
|
266
|
+
}
|
267
|
+
|
268
|
+
function isMessageForUs() {
|
269
|
+
return (
|
270
|
+
msgId === ('' + msg).substr(0, msgIdLen) &&
|
271
|
+
msg.substr(msgIdLen).split(':')[0] in settings
|
272
|
+
) // ''+Protects against non-string msg
|
273
|
+
}
|
274
|
+
|
275
|
+
function isMessageFromMetaParent() {
|
276
|
+
// Test if this message is from a parent above us. This is an ugly test, however, updating
|
277
|
+
// the message format would break backwards compatibity.
|
278
|
+
var retCode = messageData.type in { true: 1, false: 1, undefined: 1 }
|
279
|
+
|
280
|
+
if (retCode) {
|
281
|
+
log(iframeId, 'Ignoring init message from meta parent page')
|
282
|
+
}
|
283
|
+
|
284
|
+
return retCode
|
285
|
+
}
|
286
|
+
|
287
|
+
function getMsgBody(offset) {
|
288
|
+
return msg.substr(msg.indexOf(':') + msgHeaderLen + offset)
|
289
|
+
}
|
290
|
+
|
291
|
+
function forwardMsgFromIFrame(msgBody) {
|
292
|
+
log(
|
293
|
+
iframeId,
|
294
|
+
'onMessage passed: {iframe: ' +
|
295
|
+
messageData.iframe.id +
|
296
|
+
', message: ' +
|
297
|
+
msgBody +
|
298
|
+
'}'
|
299
|
+
)
|
300
|
+
on('onMessage', {
|
301
|
+
iframe: messageData.iframe,
|
302
|
+
message: JSON.parse(msgBody)
|
303
|
+
})
|
304
|
+
log(iframeId, '--')
|
305
|
+
}
|
306
|
+
|
307
|
+
function getPageInfo() {
|
308
|
+
var bodyPosition = document.body.getBoundingClientRect(),
|
309
|
+
iFramePosition = messageData.iframe.getBoundingClientRect()
|
310
|
+
|
311
|
+
return JSON.stringify({
|
312
|
+
iframeHeight: iFramePosition.height,
|
313
|
+
iframeWidth: iFramePosition.width,
|
314
|
+
clientHeight: Math.max(
|
315
|
+
document.documentElement.clientHeight,
|
316
|
+
window.innerHeight || 0
|
317
|
+
),
|
318
|
+
clientWidth: Math.max(
|
319
|
+
document.documentElement.clientWidth,
|
320
|
+
window.innerWidth || 0
|
321
|
+
),
|
322
|
+
offsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),
|
323
|
+
offsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),
|
324
|
+
scrollTop: window.pageYOffset,
|
325
|
+
scrollLeft: window.pageXOffset,
|
326
|
+
documentHeight: document.documentElement.clientHeight,
|
327
|
+
documentWidth: document.documentElement.clientWidth,
|
328
|
+
windowHeight: window.innerHeight,
|
329
|
+
windowWidth: window.innerWidth
|
330
|
+
})
|
331
|
+
}
|
332
|
+
|
333
|
+
function sendPageInfoToIframe(iframe, iframeId) {
|
334
|
+
function debouncedTrigger() {
|
335
|
+
trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId)
|
336
|
+
}
|
337
|
+
debounceFrameEvents(debouncedTrigger, 32, iframeId)
|
338
|
+
}
|
339
|
+
|
340
|
+
function startPageInfoMonitor() {
|
341
|
+
function setListener(type, func) {
|
342
|
+
function sendPageInfo() {
|
343
|
+
if (settings[id]) {
|
344
|
+
sendPageInfoToIframe(settings[id].iframe, id)
|
345
|
+
} else {
|
346
|
+
stop()
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
350
|
+
;['scroll', 'resize'].forEach(function (evt) {
|
351
|
+
log(id, type + evt + ' listener for sendPageInfo')
|
352
|
+
func(window, evt, sendPageInfo)
|
353
|
+
})
|
354
|
+
}
|
355
|
+
|
356
|
+
function stop() {
|
357
|
+
setListener('Remove ', removeEventListener)
|
358
|
+
}
|
359
|
+
|
360
|
+
function start() {
|
361
|
+
setListener('Add ', addEventListener)
|
362
|
+
}
|
363
|
+
|
364
|
+
var id = iframeId // Create locally scoped copy of iFrame ID
|
365
|
+
|
366
|
+
start()
|
367
|
+
|
368
|
+
if (settings[id]) {
|
369
|
+
settings[id].stopPageInfo = stop
|
370
|
+
}
|
371
|
+
}
|
372
|
+
|
373
|
+
function stopPageInfoMonitor() {
|
374
|
+
if (settings[iframeId] && settings[iframeId].stopPageInfo) {
|
375
|
+
settings[iframeId].stopPageInfo()
|
376
|
+
delete settings[iframeId].stopPageInfo
|
377
|
+
}
|
378
|
+
}
|
379
|
+
|
380
|
+
function checkIFrameExists() {
|
381
|
+
var retBool = true
|
382
|
+
|
383
|
+
if (null === messageData.iframe) {
|
384
|
+
warn(iframeId, 'IFrame (' + messageData.id + ') not found')
|
385
|
+
retBool = false
|
386
|
+
}
|
387
|
+
return retBool
|
388
|
+
}
|
389
|
+
|
390
|
+
function getElementPosition(target) {
|
391
|
+
var iFramePosition = target.getBoundingClientRect()
|
392
|
+
|
393
|
+
getPagePosition(iframeId)
|
394
|
+
|
395
|
+
return {
|
396
|
+
x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),
|
397
|
+
y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))
|
398
|
+
}
|
399
|
+
}
|
400
|
+
|
401
|
+
function scrollRequestFromChild(addOffset) {
|
402
|
+
/* istanbul ignore next */ // Not testable in Karma
|
403
|
+
function reposition() {
|
404
|
+
pagePosition = newPosition
|
405
|
+
scrollTo()
|
406
|
+
log(iframeId, '--')
|
407
|
+
}
|
408
|
+
|
409
|
+
function calcOffset() {
|
410
|
+
return {
|
411
|
+
x: Number(messageData.width) + offset.x,
|
412
|
+
y: Number(messageData.height) + offset.y
|
413
|
+
}
|
414
|
+
}
|
415
|
+
|
416
|
+
function scrollParent() {
|
417
|
+
if (window.parentIFrame) {
|
418
|
+
window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](
|
419
|
+
newPosition.x,
|
420
|
+
newPosition.y
|
421
|
+
)
|
422
|
+
} else {
|
423
|
+
warn(
|
424
|
+
iframeId,
|
425
|
+
'Unable to scroll to requested position, window.parentIFrame not found'
|
426
|
+
)
|
427
|
+
}
|
428
|
+
}
|
429
|
+
|
430
|
+
var offset = addOffset
|
431
|
+
? getElementPosition(messageData.iframe)
|
432
|
+
: { x: 0, y: 0 },
|
433
|
+
newPosition = calcOffset()
|
434
|
+
|
435
|
+
log(
|
436
|
+
iframeId,
|
437
|
+
'Reposition requested from iFrame (offset x:' +
|
438
|
+
offset.x +
|
439
|
+
' y:' +
|
440
|
+
offset.y +
|
441
|
+
')'
|
442
|
+
)
|
443
|
+
|
444
|
+
if (window.top !== window.self) {
|
445
|
+
scrollParent()
|
446
|
+
} else {
|
447
|
+
reposition()
|
448
|
+
}
|
449
|
+
}
|
450
|
+
|
451
|
+
function scrollTo() {
|
452
|
+
if (false !== on('onScroll', pagePosition)) {
|
453
|
+
setPagePosition(iframeId)
|
454
|
+
} else {
|
455
|
+
unsetPagePosition()
|
456
|
+
}
|
457
|
+
}
|
458
|
+
|
459
|
+
function findTarget(location) {
|
460
|
+
function jumpToTarget() {
|
461
|
+
var jumpPosition = getElementPosition(target)
|
462
|
+
|
463
|
+
log(
|
464
|
+
iframeId,
|
465
|
+
'Moving to in page link (#' +
|
466
|
+
hash +
|
467
|
+
') at x: ' +
|
468
|
+
jumpPosition.x +
|
469
|
+
' y: ' +
|
470
|
+
jumpPosition.y
|
471
|
+
)
|
472
|
+
pagePosition = {
|
473
|
+
x: jumpPosition.x,
|
474
|
+
y: jumpPosition.y
|
475
|
+
}
|
476
|
+
|
477
|
+
scrollTo()
|
478
|
+
log(iframeId, '--')
|
479
|
+
}
|
480
|
+
|
481
|
+
function jumpToParent() {
|
482
|
+
if (window.parentIFrame) {
|
483
|
+
window.parentIFrame.moveToAnchor(hash)
|
484
|
+
} else {
|
485
|
+
log(
|
486
|
+
iframeId,
|
487
|
+
'In page link #' +
|
488
|
+
hash +
|
489
|
+
' not found and window.parentIFrame not found'
|
490
|
+
)
|
491
|
+
}
|
492
|
+
}
|
493
|
+
|
494
|
+
var hash = location.split('#')[1] || '',
|
495
|
+
hashData = decodeURIComponent(hash),
|
496
|
+
target =
|
497
|
+
document.getElementById(hashData) ||
|
498
|
+
document.getElementsByName(hashData)[0]
|
499
|
+
|
500
|
+
if (target) {
|
501
|
+
jumpToTarget()
|
502
|
+
} else if (window.top !== window.self) {
|
503
|
+
jumpToParent()
|
504
|
+
} else {
|
505
|
+
log(iframeId, 'In page link #' + hash + ' not found')
|
506
|
+
}
|
507
|
+
}
|
508
|
+
|
509
|
+
function on(funcName, val) {
|
510
|
+
return chkEvent(iframeId, funcName, val)
|
511
|
+
}
|
512
|
+
|
513
|
+
function actionMsg() {
|
514
|
+
if (settings[iframeId] && settings[iframeId].firstRun) firstRun()
|
515
|
+
|
516
|
+
switch (messageData.type) {
|
517
|
+
case 'close':
|
518
|
+
closeIFrame(messageData.iframe)
|
519
|
+
break
|
520
|
+
|
521
|
+
case 'message':
|
522
|
+
forwardMsgFromIFrame(getMsgBody(6))
|
523
|
+
break
|
524
|
+
|
525
|
+
case 'autoResize':
|
526
|
+
settings[iframeId].autoResize = JSON.parse(getMsgBody(9))
|
527
|
+
break
|
528
|
+
|
529
|
+
case 'scrollTo':
|
530
|
+
scrollRequestFromChild(false)
|
531
|
+
break
|
532
|
+
|
533
|
+
case 'scrollToOffset':
|
534
|
+
scrollRequestFromChild(true)
|
535
|
+
break
|
536
|
+
|
537
|
+
case 'pageInfo':
|
538
|
+
sendPageInfoToIframe(
|
539
|
+
settings[iframeId] && settings[iframeId].iframe,
|
540
|
+
iframeId
|
541
|
+
)
|
542
|
+
startPageInfoMonitor()
|
543
|
+
break
|
544
|
+
|
545
|
+
case 'pageInfoStop':
|
546
|
+
stopPageInfoMonitor()
|
547
|
+
break
|
548
|
+
|
549
|
+
case 'inPageLink':
|
550
|
+
findTarget(getMsgBody(9))
|
551
|
+
break
|
552
|
+
|
553
|
+
case 'reset':
|
554
|
+
resetIFrame(messageData)
|
555
|
+
break
|
556
|
+
|
557
|
+
case 'init':
|
558
|
+
resizeIFrame()
|
559
|
+
on('onInit', messageData.iframe)
|
560
|
+
break
|
561
|
+
|
562
|
+
default:
|
563
|
+
resizeIFrame()
|
564
|
+
}
|
565
|
+
}
|
566
|
+
|
567
|
+
function hasSettings(iframeId) {
|
568
|
+
var retBool = true
|
569
|
+
|
570
|
+
if (!settings[iframeId]) {
|
571
|
+
retBool = false
|
572
|
+
warn(
|
573
|
+
messageData.type +
|
574
|
+
' No settings for ' +
|
575
|
+
iframeId +
|
576
|
+
'. Message was: ' +
|
577
|
+
msg
|
578
|
+
)
|
579
|
+
}
|
580
|
+
|
581
|
+
return retBool
|
582
|
+
}
|
583
|
+
|
584
|
+
function iFrameReadyMsgReceived() {
|
585
|
+
// eslint-disable-next-line no-restricted-syntax, guard-for-in
|
586
|
+
for (var iframeId in settings) {
|
587
|
+
trigger(
|
588
|
+
'iFrame requested init',
|
589
|
+
createOutgoingMsg(iframeId),
|
590
|
+
settings[iframeId].iframe,
|
591
|
+
iframeId
|
592
|
+
)
|
593
|
+
}
|
594
|
+
}
|
595
|
+
|
596
|
+
function firstRun() {
|
597
|
+
if (settings[iframeId]) {
|
598
|
+
settings[iframeId].firstRun = false
|
599
|
+
}
|
600
|
+
}
|
601
|
+
|
602
|
+
var msg = event.data,
|
603
|
+
messageData = {},
|
604
|
+
iframeId = null
|
605
|
+
|
606
|
+
if ('[iFrameResizerChild]Ready' === msg) {
|
607
|
+
iFrameReadyMsgReceived()
|
608
|
+
} else if (isMessageForUs()) {
|
609
|
+
messageData = processMsg()
|
610
|
+
iframeId = messageData.id
|
611
|
+
if (settings[iframeId]) {
|
612
|
+
settings[iframeId].loaded = true
|
613
|
+
}
|
614
|
+
|
615
|
+
if (!isMessageFromMetaParent() && hasSettings(iframeId)) {
|
616
|
+
log(iframeId, 'Received: ' + msg)
|
617
|
+
|
618
|
+
if (checkIFrameExists() && isMessageFromIFrame()) {
|
619
|
+
actionMsg()
|
620
|
+
}
|
621
|
+
}
|
622
|
+
} else {
|
623
|
+
info(iframeId, 'Ignored: ' + msg)
|
624
|
+
}
|
625
|
+
}
|
626
|
+
|
627
|
+
function chkEvent(iframeId, funcName, val) {
|
628
|
+
var func = null,
|
629
|
+
retVal = null
|
630
|
+
|
631
|
+
if (settings[iframeId]) {
|
632
|
+
func = settings[iframeId][funcName]
|
633
|
+
|
634
|
+
if ('function' === typeof func) {
|
635
|
+
retVal = func(val)
|
636
|
+
} else {
|
637
|
+
throw new TypeError(
|
638
|
+
funcName + ' on iFrame[' + iframeId + '] is not a function'
|
639
|
+
)
|
640
|
+
}
|
641
|
+
}
|
642
|
+
|
643
|
+
return retVal
|
644
|
+
}
|
645
|
+
|
646
|
+
function removeIframeListeners(iframe) {
|
647
|
+
var iframeId = iframe.id
|
648
|
+
delete settings[iframeId]
|
649
|
+
}
|
650
|
+
|
651
|
+
function closeIFrame(iframe) {
|
652
|
+
var iframeId = iframe.id
|
653
|
+
if (chkEvent(iframeId, 'onClose', iframeId) === false) {
|
654
|
+
log(iframeId, 'Close iframe cancelled by onClose event')
|
655
|
+
return
|
656
|
+
}
|
657
|
+
log(iframeId, 'Removing iFrame: ' + iframeId)
|
658
|
+
|
659
|
+
try {
|
660
|
+
// Catch race condition error with React
|
661
|
+
if (iframe.parentNode) {
|
662
|
+
iframe.parentNode.removeChild(iframe)
|
663
|
+
}
|
664
|
+
} catch (error) {
|
665
|
+
warn(error)
|
666
|
+
}
|
667
|
+
|
668
|
+
chkEvent(iframeId, 'onClosed', iframeId)
|
669
|
+
log(iframeId, '--')
|
670
|
+
removeIframeListeners(iframe)
|
671
|
+
}
|
672
|
+
|
673
|
+
function getPagePosition(iframeId) {
|
674
|
+
if (null === pagePosition) {
|
675
|
+
pagePosition = {
|
676
|
+
x:
|
677
|
+
window.pageXOffset !== undefined
|
678
|
+
? window.pageXOffset
|
679
|
+
: document.documentElement.scrollLeft,
|
680
|
+
y:
|
681
|
+
window.pageYOffset !== undefined
|
682
|
+
? window.pageYOffset
|
683
|
+
: document.documentElement.scrollTop
|
684
|
+
}
|
685
|
+
log(
|
686
|
+
iframeId,
|
687
|
+
'Get page position: ' + pagePosition.x + ',' + pagePosition.y
|
688
|
+
)
|
689
|
+
}
|
690
|
+
}
|
691
|
+
|
692
|
+
function setPagePosition(iframeId) {
|
693
|
+
if (null !== pagePosition) {
|
694
|
+
window.scrollTo(pagePosition.x, pagePosition.y)
|
695
|
+
log(
|
696
|
+
iframeId,
|
697
|
+
'Set page position: ' + pagePosition.x + ',' + pagePosition.y
|
698
|
+
)
|
699
|
+
unsetPagePosition()
|
700
|
+
}
|
701
|
+
}
|
702
|
+
|
703
|
+
function unsetPagePosition() {
|
704
|
+
pagePosition = null
|
705
|
+
}
|
706
|
+
|
707
|
+
function resetIFrame(messageData) {
|
708
|
+
function reset() {
|
709
|
+
setSize(messageData)
|
710
|
+
trigger('reset', 'reset', messageData.iframe, messageData.id)
|
711
|
+
}
|
712
|
+
|
713
|
+
log(
|
714
|
+
messageData.id,
|
715
|
+
'Size reset requested by ' +
|
716
|
+
('init' === messageData.type ? 'host page' : 'iFrame')
|
717
|
+
)
|
718
|
+
getPagePosition(messageData.id)
|
719
|
+
syncResize(reset, messageData, 'reset')
|
720
|
+
}
|
721
|
+
|
722
|
+
function setSize(messageData) {
|
723
|
+
function setDimension(dimension) {
|
724
|
+
if (!messageData.id) {
|
725
|
+
log('undefined', 'messageData id not set')
|
726
|
+
return
|
727
|
+
}
|
728
|
+
messageData.iframe.style[dimension] = messageData[dimension] + 'px'
|
729
|
+
log(
|
730
|
+
messageData.id,
|
731
|
+
'IFrame (' +
|
732
|
+
iframeId +
|
733
|
+
') ' +
|
734
|
+
dimension +
|
735
|
+
' set to ' +
|
736
|
+
messageData[dimension] +
|
737
|
+
'px'
|
738
|
+
)
|
739
|
+
}
|
740
|
+
|
741
|
+
function chkZero(dimension) {
|
742
|
+
// FireFox sets dimension of hidden iFrames to zero.
|
743
|
+
// So if we detect that set up an event to check for
|
744
|
+
// when iFrame becomes visible.
|
745
|
+
|
746
|
+
/* istanbul ignore next */ // Not testable in PhantomJS
|
747
|
+
if (!hiddenCheckEnabled && '0' === messageData[dimension]) {
|
748
|
+
hiddenCheckEnabled = true
|
749
|
+
log(iframeId, 'Hidden iFrame detected, creating visibility listener')
|
750
|
+
fixHiddenIFrames()
|
751
|
+
}
|
752
|
+
}
|
753
|
+
|
754
|
+
function processDimension(dimension) {
|
755
|
+
setDimension(dimension)
|
756
|
+
chkZero(dimension)
|
757
|
+
}
|
758
|
+
|
759
|
+
var iframeId = messageData.iframe.id
|
760
|
+
|
761
|
+
if (settings[iframeId]) {
|
762
|
+
if (settings[iframeId].sizeHeight) {
|
763
|
+
processDimension('height')
|
764
|
+
}
|
765
|
+
if (settings[iframeId].sizeWidth) {
|
766
|
+
processDimension('width')
|
767
|
+
}
|
768
|
+
}
|
769
|
+
}
|
770
|
+
|
771
|
+
function syncResize(func, messageData, doNotSync) {
|
772
|
+
/* istanbul ignore if */ // Not testable in PhantomJS
|
773
|
+
if (
|
774
|
+
doNotSync !== messageData.type &&
|
775
|
+
requestAnimationFrame &&
|
776
|
+
// including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
|
777
|
+
!window.jasmine
|
778
|
+
) {
|
779
|
+
log(messageData.id, 'Requesting animation frame')
|
780
|
+
requestAnimationFrame(func)
|
781
|
+
} else {
|
782
|
+
func()
|
783
|
+
}
|
784
|
+
}
|
785
|
+
|
786
|
+
function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {
|
787
|
+
function postMessageToIFrame() {
|
788
|
+
var target = settings[id] && settings[id].targetOrigin
|
789
|
+
log(
|
790
|
+
id,
|
791
|
+
'[' +
|
792
|
+
calleeMsg +
|
793
|
+
'] Sending msg to iframe[' +
|
794
|
+
id +
|
795
|
+
'] (' +
|
796
|
+
msg +
|
797
|
+
') targetOrigin: ' +
|
798
|
+
target
|
799
|
+
)
|
800
|
+
iframe.contentWindow.postMessage(msgId + msg, target)
|
801
|
+
}
|
802
|
+
|
803
|
+
function iFrameNotFound() {
|
804
|
+
warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found')
|
805
|
+
}
|
806
|
+
|
807
|
+
function chkAndSend() {
|
808
|
+
if (
|
809
|
+
iframe &&
|
810
|
+
'contentWindow' in iframe &&
|
811
|
+
null !== iframe.contentWindow
|
812
|
+
) {
|
813
|
+
// Null test for PhantomJS
|
814
|
+
postMessageToIFrame()
|
815
|
+
} else {
|
816
|
+
iFrameNotFound()
|
817
|
+
}
|
818
|
+
}
|
819
|
+
|
820
|
+
function warnOnNoResponse() {
|
821
|
+
function warning() {
|
822
|
+
if (settings[id] && !settings[id].loaded && !errorShown) {
|
823
|
+
errorShown = true
|
824
|
+
warn(
|
825
|
+
id,
|
826
|
+
'IFrame has not responded within ' +
|
827
|
+
settings[id].warningTimeout / 1000 +
|
828
|
+
' seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.'
|
829
|
+
)
|
830
|
+
}
|
831
|
+
}
|
832
|
+
|
833
|
+
if (
|
834
|
+
!!noResponseWarning &&
|
835
|
+
settings[id] &&
|
836
|
+
!!settings[id].warningTimeout
|
837
|
+
) {
|
838
|
+
settings[id].msgTimeout = setTimeout(
|
839
|
+
warning,
|
840
|
+
settings[id].warningTimeout
|
841
|
+
)
|
842
|
+
}
|
843
|
+
}
|
844
|
+
|
845
|
+
var errorShown = false
|
846
|
+
|
847
|
+
id = id || iframe.id
|
848
|
+
|
849
|
+
if (settings[id]) {
|
850
|
+
chkAndSend()
|
851
|
+
warnOnNoResponse()
|
852
|
+
}
|
853
|
+
}
|
854
|
+
|
855
|
+
function createOutgoingMsg(iframeId) {
|
856
|
+
return (
|
857
|
+
iframeId +
|
858
|
+
':' +
|
859
|
+
settings[iframeId].bodyMarginV1 +
|
860
|
+
':' +
|
861
|
+
settings[iframeId].sizeWidth +
|
862
|
+
':' +
|
863
|
+
settings[iframeId].log +
|
864
|
+
':' +
|
865
|
+
settings[iframeId].interval +
|
866
|
+
':' +
|
867
|
+
settings[iframeId].enablePublicMethods +
|
868
|
+
':' +
|
869
|
+
settings[iframeId].autoResize +
|
870
|
+
':' +
|
871
|
+
settings[iframeId].bodyMargin +
|
872
|
+
':' +
|
873
|
+
settings[iframeId].heightCalculationMethod +
|
874
|
+
':' +
|
875
|
+
settings[iframeId].bodyBackground +
|
876
|
+
':' +
|
877
|
+
settings[iframeId].bodyPadding +
|
878
|
+
':' +
|
879
|
+
settings[iframeId].tolerance +
|
880
|
+
':' +
|
881
|
+
settings[iframeId].inPageLinks +
|
882
|
+
':' +
|
883
|
+
settings[iframeId].resizeFrom +
|
884
|
+
':' +
|
885
|
+
settings[iframeId].widthCalculationMethod
|
886
|
+
)
|
887
|
+
}
|
888
|
+
|
889
|
+
function setupIFrame(iframe, options) {
|
890
|
+
function setLimits() {
|
891
|
+
function addStyle(style) {
|
892
|
+
if (
|
893
|
+
Infinity !== settings[iframeId][style] &&
|
894
|
+
0 !== settings[iframeId][style]
|
895
|
+
) {
|
896
|
+
iframe.style[style] = settings[iframeId][style] + 'px'
|
897
|
+
log(
|
898
|
+
iframeId,
|
899
|
+
'Set ' + style + ' = ' + settings[iframeId][style] + 'px'
|
900
|
+
)
|
901
|
+
}
|
902
|
+
}
|
903
|
+
|
904
|
+
function chkMinMax(dimension) {
|
905
|
+
if (
|
906
|
+
settings[iframeId]['min' + dimension] >
|
907
|
+
settings[iframeId]['max' + dimension]
|
908
|
+
) {
|
909
|
+
throw new Error(
|
910
|
+
'Value for min' +
|
911
|
+
dimension +
|
912
|
+
' can not be greater than max' +
|
913
|
+
dimension
|
914
|
+
)
|
915
|
+
}
|
916
|
+
}
|
917
|
+
|
918
|
+
chkMinMax('Height')
|
919
|
+
chkMinMax('Width')
|
920
|
+
|
921
|
+
addStyle('maxHeight')
|
922
|
+
addStyle('minHeight')
|
923
|
+
addStyle('maxWidth')
|
924
|
+
addStyle('minWidth')
|
925
|
+
}
|
926
|
+
|
927
|
+
function newId() {
|
928
|
+
var id = (options && options.id) || defaults.id + count++
|
929
|
+
if (null !== document.getElementById(id)) {
|
930
|
+
id += count++
|
931
|
+
}
|
932
|
+
return id
|
933
|
+
}
|
934
|
+
|
935
|
+
function ensureHasId(iframeId) {
|
936
|
+
if ('' === iframeId) {
|
937
|
+
// eslint-disable-next-line no-multi-assign
|
938
|
+
iframe.id = iframeId = newId()
|
939
|
+
logEnabled = (options || {}).log
|
940
|
+
log(
|
941
|
+
iframeId,
|
942
|
+
'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'
|
943
|
+
)
|
944
|
+
}
|
945
|
+
|
946
|
+
return iframeId
|
947
|
+
}
|
948
|
+
|
949
|
+
function setScrolling() {
|
950
|
+
log(
|
951
|
+
iframeId,
|
952
|
+
'IFrame scrolling ' +
|
953
|
+
(settings[iframeId] && settings[iframeId].scrolling
|
954
|
+
? 'enabled'
|
955
|
+
: 'disabled') +
|
956
|
+
' for ' +
|
957
|
+
iframeId
|
958
|
+
)
|
959
|
+
iframe.style.overflow =
|
960
|
+
false === (settings[iframeId] && settings[iframeId].scrolling)
|
961
|
+
? 'hidden'
|
962
|
+
: 'auto'
|
963
|
+
switch (settings[iframeId] && settings[iframeId].scrolling) {
|
964
|
+
case 'omit':
|
965
|
+
break
|
966
|
+
|
967
|
+
case true:
|
968
|
+
iframe.scrolling = 'yes'
|
969
|
+
break
|
970
|
+
|
971
|
+
case false:
|
972
|
+
iframe.scrolling = 'no'
|
973
|
+
break
|
974
|
+
|
975
|
+
default:
|
976
|
+
iframe.scrolling = settings[iframeId]
|
977
|
+
? settings[iframeId].scrolling
|
978
|
+
: 'no'
|
979
|
+
}
|
980
|
+
}
|
981
|
+
|
982
|
+
// The V1 iFrame script expects an int, where as in V2 expects a CSS
|
983
|
+
// string value such as '1px 3em', so if we have an int for V2, set V1=V2
|
984
|
+
// and then convert V2 to a string PX value.
|
985
|
+
function setupBodyMarginValues() {
|
986
|
+
if (
|
987
|
+
'number' ===
|
988
|
+
typeof (settings[iframeId] && settings[iframeId].bodyMargin) ||
|
989
|
+
'0' === (settings[iframeId] && settings[iframeId].bodyMargin)
|
990
|
+
) {
|
991
|
+
settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin
|
992
|
+
settings[iframeId].bodyMargin =
|
993
|
+
'' + settings[iframeId].bodyMargin + 'px'
|
994
|
+
}
|
995
|
+
}
|
996
|
+
|
997
|
+
function checkReset() {
|
998
|
+
// Reduce scope of firstRun to function, because IE8's JS execution
|
999
|
+
// context stack is borked and this value gets externally
|
1000
|
+
// changed midway through running this function!!!
|
1001
|
+
var firstRun = settings[iframeId] && settings[iframeId].firstRun,
|
1002
|
+
resetRequertMethod =
|
1003
|
+
settings[iframeId] &&
|
1004
|
+
settings[iframeId].heightCalculationMethod in resetRequiredMethods
|
1005
|
+
|
1006
|
+
if (!firstRun && resetRequertMethod) {
|
1007
|
+
resetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' })
|
1008
|
+
}
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
function setupIFrameObject() {
|
1012
|
+
if (settings[iframeId]) {
|
1013
|
+
settings[iframeId].iframe.iFrameResizer = {
|
1014
|
+
close: closeIFrame.bind(null, settings[iframeId].iframe),
|
1015
|
+
|
1016
|
+
removeListeners: removeIframeListeners.bind(
|
1017
|
+
null,
|
1018
|
+
settings[iframeId].iframe
|
1019
|
+
),
|
1020
|
+
|
1021
|
+
resize: trigger.bind(
|
1022
|
+
null,
|
1023
|
+
'Window resize',
|
1024
|
+
'resize',
|
1025
|
+
settings[iframeId].iframe
|
1026
|
+
),
|
1027
|
+
|
1028
|
+
moveToAnchor: function (anchor) {
|
1029
|
+
trigger(
|
1030
|
+
'Move to anchor',
|
1031
|
+
'moveToAnchor:' + anchor,
|
1032
|
+
settings[iframeId].iframe,
|
1033
|
+
iframeId
|
1034
|
+
)
|
1035
|
+
},
|
1036
|
+
|
1037
|
+
sendMessage: function (message) {
|
1038
|
+
message = JSON.stringify(message)
|
1039
|
+
trigger(
|
1040
|
+
'Send Message',
|
1041
|
+
'message:' + message,
|
1042
|
+
settings[iframeId].iframe,
|
1043
|
+
iframeId
|
1044
|
+
)
|
1045
|
+
}
|
1046
|
+
}
|
1047
|
+
}
|
1048
|
+
}
|
1049
|
+
|
1050
|
+
// We have to call trigger twice, as we can not be sure if all
|
1051
|
+
// iframes have completed loading when this code runs. The
|
1052
|
+
// event listener also catches the page changing in the iFrame.
|
1053
|
+
function init(msg) {
|
1054
|
+
function iFrameLoaded() {
|
1055
|
+
trigger('iFrame.onload', msg, iframe, undefined, true)
|
1056
|
+
checkReset()
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
function createDestroyObserver(MutationObserver) {
|
1060
|
+
if (!iframe.parentNode) {
|
1061
|
+
return
|
1062
|
+
}
|
1063
|
+
|
1064
|
+
var destroyObserver = new MutationObserver(function (mutations) {
|
1065
|
+
mutations.forEach(function (mutation) {
|
1066
|
+
var removedNodes = Array.prototype.slice.call(mutation.removedNodes) // Transform NodeList into an Array
|
1067
|
+
removedNodes.forEach(function (removedNode) {
|
1068
|
+
if (removedNode === iframe) {
|
1069
|
+
closeIFrame(iframe)
|
1070
|
+
}
|
1071
|
+
})
|
1072
|
+
})
|
1073
|
+
})
|
1074
|
+
destroyObserver.observe(iframe.parentNode, {
|
1075
|
+
childList: true
|
1076
|
+
})
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
var MutationObserver = getMutationObserver()
|
1080
|
+
if (MutationObserver) {
|
1081
|
+
createDestroyObserver(MutationObserver)
|
1082
|
+
}
|
1083
|
+
|
1084
|
+
addEventListener(iframe, 'load', iFrameLoaded)
|
1085
|
+
trigger('init', msg, iframe, undefined, true)
|
1086
|
+
}
|
1087
|
+
|
1088
|
+
function checkOptions(options) {
|
1089
|
+
if ('object' !== typeof options) {
|
1090
|
+
throw new TypeError('Options is not an object')
|
1091
|
+
}
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
function copyOptions(options) {
|
1095
|
+
// eslint-disable-next-line no-restricted-syntax
|
1096
|
+
for (var option in defaults) {
|
1097
|
+
if (Object.prototype.hasOwnProperty.call(defaults, option)) {
|
1098
|
+
settings[iframeId][option] = Object.prototype.hasOwnProperty.call(
|
1099
|
+
options,
|
1100
|
+
option
|
1101
|
+
)
|
1102
|
+
? options[option]
|
1103
|
+
: defaults[option]
|
1104
|
+
}
|
1105
|
+
}
|
1106
|
+
}
|
1107
|
+
|
1108
|
+
function getTargetOrigin(remoteHost) {
|
1109
|
+
return '' === remoteHost ||
|
1110
|
+
null !== remoteHost.match(/^(about:blank|javascript:|file:\/\/)/)
|
1111
|
+
? '*'
|
1112
|
+
: remoteHost
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
function depricate(key) {
|
1116
|
+
var splitName = key.split('Callback')
|
1117
|
+
|
1118
|
+
if (splitName.length === 2) {
|
1119
|
+
var name =
|
1120
|
+
'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1)
|
1121
|
+
this[name] = this[key]
|
1122
|
+
delete this[key]
|
1123
|
+
warn(
|
1124
|
+
iframeId,
|
1125
|
+
"Deprecated: '" +
|
1126
|
+
key +
|
1127
|
+
"' has been renamed '" +
|
1128
|
+
name +
|
1129
|
+
"'. The old method will be removed in the next major version."
|
1130
|
+
)
|
1131
|
+
}
|
1132
|
+
}
|
1133
|
+
|
1134
|
+
function processOptions(options) {
|
1135
|
+
options = options || {}
|
1136
|
+
settings[iframeId] = {
|
1137
|
+
firstRun: true,
|
1138
|
+
iframe: iframe,
|
1139
|
+
remoteHost: iframe.src && iframe.src.split('/').slice(0, 3).join('/')
|
1140
|
+
}
|
1141
|
+
|
1142
|
+
checkOptions(options)
|
1143
|
+
Object.keys(options).forEach(depricate, options)
|
1144
|
+
copyOptions(options)
|
1145
|
+
|
1146
|
+
if (settings[iframeId]) {
|
1147
|
+
settings[iframeId].targetOrigin =
|
1148
|
+
true === settings[iframeId].checkOrigin
|
1149
|
+
? getTargetOrigin(settings[iframeId].remoteHost)
|
1150
|
+
: '*'
|
1151
|
+
}
|
1152
|
+
}
|
1153
|
+
|
1154
|
+
function beenHere() {
|
1155
|
+
return iframeId in settings && 'iFrameResizer' in iframe
|
1156
|
+
}
|
1157
|
+
|
1158
|
+
var iframeId = ensureHasId(iframe.id)
|
1159
|
+
|
1160
|
+
if (!beenHere()) {
|
1161
|
+
processOptions(options)
|
1162
|
+
setScrolling()
|
1163
|
+
setLimits()
|
1164
|
+
setupBodyMarginValues()
|
1165
|
+
init(createOutgoingMsg(iframeId))
|
1166
|
+
setupIFrameObject()
|
1167
|
+
} else {
|
1168
|
+
warn(iframeId, 'Ignored iFrame, already setup.')
|
1169
|
+
}
|
1170
|
+
}
|
1171
|
+
|
1172
|
+
function debouce(fn, time) {
|
1173
|
+
if (null === timer) {
|
1174
|
+
timer = setTimeout(function () {
|
1175
|
+
timer = null
|
1176
|
+
fn()
|
1177
|
+
}, time)
|
1178
|
+
}
|
1179
|
+
}
|
1180
|
+
|
1181
|
+
var frameTimer = {}
|
1182
|
+
function debounceFrameEvents(fn, time, frameId) {
|
1183
|
+
if (!frameTimer[frameId]) {
|
1184
|
+
frameTimer[frameId] = setTimeout(function () {
|
1185
|
+
frameTimer[frameId] = null
|
1186
|
+
fn()
|
1187
|
+
}, time)
|
1188
|
+
}
|
1189
|
+
}
|
1190
|
+
|
1191
|
+
// Not testable in PhantomJS
|
1192
|
+
/* istanbul ignore next */
|
1193
|
+
|
1194
|
+
function fixHiddenIFrames() {
|
1195
|
+
function checkIFrames() {
|
1196
|
+
function checkIFrame(settingId) {
|
1197
|
+
function chkDimension(dimension) {
|
1198
|
+
return (
|
1199
|
+
'0px' ===
|
1200
|
+
(settings[settingId] && settings[settingId].iframe.style[dimension])
|
1201
|
+
)
|
1202
|
+
}
|
1203
|
+
|
1204
|
+
function isVisible(el) {
|
1205
|
+
return null !== el.offsetParent
|
1206
|
+
}
|
1207
|
+
|
1208
|
+
if (
|
1209
|
+
settings[settingId] &&
|
1210
|
+
isVisible(settings[settingId].iframe) &&
|
1211
|
+
(chkDimension('height') || chkDimension('width'))
|
1212
|
+
) {
|
1213
|
+
trigger(
|
1214
|
+
'Visibility change',
|
1215
|
+
'resize',
|
1216
|
+
settings[settingId].iframe,
|
1217
|
+
settingId
|
1218
|
+
)
|
1219
|
+
}
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
Object.keys(settings).forEach(function (key) {
|
1223
|
+
checkIFrame(key)
|
1224
|
+
})
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
function mutationObserved(mutations) {
|
1228
|
+
log(
|
1229
|
+
'window',
|
1230
|
+
'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type
|
1231
|
+
)
|
1232
|
+
debouce(checkIFrames, 16)
|
1233
|
+
}
|
1234
|
+
|
1235
|
+
function createMutationObserver() {
|
1236
|
+
var target = document.querySelector('body'),
|
1237
|
+
config = {
|
1238
|
+
attributes: true,
|
1239
|
+
attributeOldValue: false,
|
1240
|
+
characterData: true,
|
1241
|
+
characterDataOldValue: false,
|
1242
|
+
childList: true,
|
1243
|
+
subtree: true
|
1244
|
+
},
|
1245
|
+
observer = new MutationObserver(mutationObserved)
|
1246
|
+
|
1247
|
+
observer.observe(target, config)
|
1248
|
+
}
|
1249
|
+
|
1250
|
+
var MutationObserver = getMutationObserver()
|
1251
|
+
if (MutationObserver) {
|
1252
|
+
createMutationObserver()
|
1253
|
+
}
|
1254
|
+
}
|
1255
|
+
|
1256
|
+
function resizeIFrames(event) {
|
1257
|
+
function resize() {
|
1258
|
+
sendTriggerMsg('Window ' + event, 'resize')
|
1259
|
+
}
|
1260
|
+
|
1261
|
+
log('window', 'Trigger event: ' + event)
|
1262
|
+
debouce(resize, 16)
|
1263
|
+
}
|
1264
|
+
|
1265
|
+
// Not testable in PhantomJS
|
1266
|
+
/* istanbul ignore next */
|
1267
|
+
function tabVisible() {
|
1268
|
+
function resize() {
|
1269
|
+
sendTriggerMsg('Tab Visable', 'resize')
|
1270
|
+
}
|
1271
|
+
|
1272
|
+
if ('hidden' !== document.visibilityState) {
|
1273
|
+
log('document', 'Trigger event: Visiblity change')
|
1274
|
+
debouce(resize, 16)
|
1275
|
+
}
|
1276
|
+
}
|
1277
|
+
|
1278
|
+
function sendTriggerMsg(eventName, event) {
|
1279
|
+
function isIFrameResizeEnabled(iframeId) {
|
1280
|
+
return (
|
1281
|
+
settings[iframeId] &&
|
1282
|
+
'parent' === settings[iframeId].resizeFrom &&
|
1283
|
+
settings[iframeId].autoResize &&
|
1284
|
+
!settings[iframeId].firstRun
|
1285
|
+
)
|
1286
|
+
}
|
1287
|
+
|
1288
|
+
Object.keys(settings).forEach(function (iframeId) {
|
1289
|
+
if (isIFrameResizeEnabled(iframeId)) {
|
1290
|
+
trigger(eventName, event, settings[iframeId].iframe, iframeId)
|
1291
|
+
}
|
1292
|
+
})
|
1293
|
+
}
|
1294
|
+
|
1295
|
+
function setupEventListeners() {
|
1296
|
+
addEventListener(window, 'message', iFrameListener)
|
1297
|
+
|
1298
|
+
addEventListener(window, 'resize', function () {
|
1299
|
+
resizeIFrames('resize')
|
1300
|
+
})
|
1301
|
+
|
1302
|
+
addEventListener(document, 'visibilitychange', tabVisible)
|
1303
|
+
|
1304
|
+
addEventListener(document, '-webkit-visibilitychange', tabVisible)
|
1305
|
+
}
|
1306
|
+
|
1307
|
+
function factory() {
|
1308
|
+
function init(options, element) {
|
1309
|
+
function chkType() {
|
1310
|
+
if (!element.tagName) {
|
1311
|
+
throw new TypeError('Object is not a valid DOM element')
|
1312
|
+
} else if ('IFRAME' !== element.tagName.toUpperCase()) {
|
1313
|
+
throw new TypeError(
|
1314
|
+
'Expected <IFRAME> tag, found <' + element.tagName + '>'
|
1315
|
+
)
|
1316
|
+
}
|
1317
|
+
}
|
1318
|
+
|
1319
|
+
if (element) {
|
1320
|
+
chkType()
|
1321
|
+
setupIFrame(element, options)
|
1322
|
+
iFrames.push(element)
|
1323
|
+
}
|
1324
|
+
}
|
1325
|
+
|
1326
|
+
function warnDeprecatedOptions(options) {
|
1327
|
+
if (options && options.enablePublicMethods) {
|
1328
|
+
warn(
|
1329
|
+
'enablePublicMethods option has been removed, public methods are now always available in the iFrame'
|
1330
|
+
)
|
1331
|
+
}
|
1332
|
+
}
|
1333
|
+
|
1334
|
+
var iFrames
|
1335
|
+
|
1336
|
+
setupRequestAnimationFrame()
|
1337
|
+
setupEventListeners()
|
1338
|
+
|
1339
|
+
return function iFrameResizeF(options, target) {
|
1340
|
+
iFrames = [] // Only return iFrames past in on this call
|
1341
|
+
|
1342
|
+
warnDeprecatedOptions(options)
|
1343
|
+
|
1344
|
+
switch (typeof target) {
|
1345
|
+
case 'undefined':
|
1346
|
+
case 'string':
|
1347
|
+
Array.prototype.forEach.call(
|
1348
|
+
document.querySelectorAll(target || 'iframe'),
|
1349
|
+
init.bind(undefined, options)
|
1350
|
+
)
|
1351
|
+
break
|
1352
|
+
|
1353
|
+
case 'object':
|
1354
|
+
init(options, target)
|
1355
|
+
break
|
1356
|
+
|
1357
|
+
default:
|
1358
|
+
throw new TypeError('Unexpected data type (' + typeof target + ')')
|
1359
|
+
}
|
1360
|
+
|
1361
|
+
return iFrames
|
1362
|
+
}
|
1363
|
+
}
|
1364
|
+
|
1365
|
+
function createJQueryPublicMethod($) {
|
1366
|
+
if (!$.fn) {
|
1367
|
+
info('', 'Unable to bind to jQuery, it is not fully loaded.')
|
1368
|
+
} else if (!$.fn.iFrameResize) {
|
1369
|
+
$.fn.iFrameResize = function $iFrameResizeF(options) {
|
1370
|
+
function init(index, element) {
|
1371
|
+
setupIFrame(element, options)
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
return this.filter('iframe').each(init).end()
|
1375
|
+
}
|
1376
|
+
}
|
1377
|
+
}
|
1378
|
+
|
1379
|
+
if (window.jQuery) {
|
1380
|
+
createJQueryPublicMethod(window.jQuery)
|
1381
|
+
}
|
1382
|
+
|
1383
|
+
if (typeof define === 'function' && define.amd) {
|
1384
|
+
define([], factory)
|
1385
|
+
} else if (typeof module === 'object' && typeof module.exports === 'object') {
|
1386
|
+
// Node for browserfy
|
1387
|
+
module.exports = factory()
|
1388
|
+
}
|
1389
|
+
window.iFrameResize = window.iFrameResize || factory()
|
1390
|
+
})()
|