iframe-resizer 4.3.11 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/.editorconfig +19 -0
  2. package/README.md +9 -101
  3. package/package.json +6 -12
package/.editorconfig ADDED
@@ -0,0 +1,19 @@
1
+ # EditorConfig helps developers define and maintain consistent
2
+ # coding styles between different editors and IDEs
3
+ # editorconfig.org
4
+
5
+ root = true
6
+
7
+ [*]
8
+ end_of_line = lf
9
+ charset = utf-8
10
+ trim_trailing_whitespace = true
11
+ insert_final_newline = true
12
+ indent_style = space
13
+ indent_size = 2
14
+
15
+ [*.hbs]
16
+ insert_final_newline = false
17
+
18
+ [*.{diff,md}]
19
+ trim_trailing_whitespace = false
package/README.md CHANGED
@@ -1,105 +1,13 @@
1
- <img src="https://raw.githubusercontent.com/davidjbradshaw/iframe-resizer/master/img/logo-no-background.svg" alt="iFrame Resizer" style="margin-bottom: -20">
1
+ [<img src="https://iframe-resizer.com/logo-full.svg" alt="" title="" style="margin-bottom: -20px">](https://iframe-resizer.com)
2
2
 
3
- [![NPM version](https://badge.fury.io/js/iframe-resizer.svg)](http://badge.fury.io/js/iframe-resizer)
4
- [![NPM Downloads](https://img.shields.io/npm/dm/iframe-resizer.svg)](https://npm-stat.com/charts.html?package=iframe-resizer&from=2014-12-31)
5
- [![](https://data.jsdelivr.com/v1/package/npm/iframe-resizer/badge?style=rounded)](https://www.jsdelivr.com/package/npm/iframe-resizer)
6
- [![Coverage Status](https://coveralls.io/repos/davidjbradshaw/iframe-resizer/badge.svg?branch=master&service=github)](https://coveralls.io/github/davidjbradshaw/iframe-resizer)
3
+ This package is a legacy version of __[iframe-resizer](https://iframe-resizer.com)__. Version 5 is now available via the following packages.
7
4
 
8
- This library enables the automatic resizing of the height and width of both same and cross domain iFrames to fit their contained content. It provides a range of features to address the most common issues with using iFrames, these include:
5
+ * [@iframe-resizer/parent](https://www.npmjs.com/package/@iframe-resizer/parent)
6
+ * [@iframe-resizer/child](https://www.npmjs.com/package/@iframe-resizer/child)
7
+ * [@iframe-resizer/react](https://www.npmjs.com/package/@iframe-resizer/react)
8
+ * [@iframe-resizer/jquery](https://www.npmjs.com/package/@iframe-resizer/jquery)
9
9
 
10
- - Height and width resizing of the iFrame to content size.
11
- - Works with multiple and nested iFrames.
12
- - Domain authentication for cross domain iFrames.
13
- - Provides a range of page size calculation methods to support complex CSS layouts.
14
- - Detects changes to the DOM that can cause the page to resize using [MutationObserver](https://developer.mozilla.org/en/docs/Web/API/MutationObserver).
15
- - Detects events that can cause the page to resize (Window Resize, CSS Animation and Transition, Orientation Change and Mouse events).
16
- - Simplified messaging between iFrame and host page via [postMessage](https://developer.mozilla.org/en-US/docs/Web/API/window.postMessage).
17
- - Fixes in page links in iFrame and supports links between the iFrame and parent page.
18
- - Provides custom sizing and scrolling methods.
19
- - Exposes parent position and viewport size to the iFrame.
20
- - Provides `onMouseEnter` and `onMouseLeave` events for the iFrame.
21
- - Works with [ViewerJS](http://viewerjs.org/) to support PDF and ODF documents.
10
+ **For more details please see our new website: [https://iframe-resizer.com](https://iframe-resizer.com).**
22
11
 
23
- ## Donate
24
-
25
- Iframe-resizer is the result of many 100s of hours of work, if you would like to join others in showing support for the continued development of this project, then please feel free to buy me a coffee.
26
-
27
- <a href="https://www.buymeacoffee.com/davidjbradshaw " target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>
28
-
29
- ## Getting Started
30
-
31
- ### Install
32
-
33
- This package can be installed via NPM (`npm install iframe-resizer --save`).
34
-
35
- ### Usage
36
-
37
- The package contains two minified JavaScript files in the [js](https://github.com/davidjbradshaw/iframe-resizer/tree/master/js) folder. The first ([iframeResizer.min.js](https://raw.githubusercontent.com/davidjbradshaw/iframe-resizer/master/js/iframeResizer.min.js)) is for the page hosting the iFrames. It can be called with via JavaScript:
38
-
39
- ```js
40
- const iframes = iFrameResize( [{options}], [css selector] || [iframe] );
41
- ```
42
-
43
- The second file ([iframeResizer.contentWindow.min.js](https://raw.github.com/davidjbradshaw/iframe-resizer/master/js/iframeResizer.contentWindow.min.js)) needs placing in the page(s) contained within your iFrame. <i>This file is designed to be a guest on someone else's system, so has no dependencies and won't do anything until it's activated by a message from the containing page</i>.
44
-
45
- ### Typical setup
46
-
47
- The normal configuration is to have the iFrame resize when the browser window changes size or the content of the iFrame changes. To set this up you need to configure one of the dimensions of the iFrame to a percentage and tell the library to only update the other dimension. Normally you would set the width to 100% and have the height scale to fit the content.
48
-
49
- ```html
50
- <style>
51
- iframe {
52
- width: 1px;
53
- min-width: 100%;
54
- }
55
- </style>
56
- <script src="/js/iframeResizer.min.js"></script>
57
- <iframe id="myIframe" src="http://anotherdomain.com/iframe.html"></iframe>
58
- <script>
59
- iFrameResize({ log: true }, '#myIframe')
60
- </script>
61
- ```
62
-
63
- **Note:** Using _min-width_ to set the width of the iFrame, works around an issue in iOS that can prevent the iFrame from sizing correctly.
64
-
65
- If you have problems, check the [troubleshooting](https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/troubleshooting.md) section.
66
-
67
- ### Example
68
-
69
- To see this working take a look at this [example](https://davidjbradshaw.github.io/iframe-resizer/example/) and watch the [console](https://developer.mozilla.org/en-US/docs/Tools/Web_Console).
70
-
71
- ## API Documentation
72
-
73
- IFrame-Resizer provides an extensive range of options and APIs for both the parent page and the iframed page.
74
-
75
- - **Parent Page API**
76
- - [Options](https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/parent_page/options.md)
77
- - [Events](https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/parent_page/events.md)
78
- - [Methods](https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/parent_page/methods.md)
79
- - **IFramed Page API**
80
- - [Options](https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/iframed_page/options.md)
81
- - [Events](https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/iframed_page/events.md)
82
- - [Methods](https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/iframed_page/methods.md)
83
- - **Use with Libraries and Frameworks**
84
- - [React](https://github.com/davidjbradshaw/iframe-resizer-react)
85
- - [Vue](https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/use_with/vue.md)
86
- - [Nuxt](https://github.com/davidjbradshaw/iframe-resizer/issues/831#issuecomment-665760332)
87
- - [Angular](https://github.com/davidjbradshaw/iframe-resizer/issues/478#issuecomment-347958630)
88
- - [Ember](https://github.com/alexlafroscia/ember-iframe-resizer-modifier)
89
- - [jQuery](https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/use_with/jquery.md)
90
- - [Google Apps Script](https://stackoverflow.com/a/65724113/2087070)
91
- - [Troubleshooting](https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/troubleshooting.md)
92
- - [Upgrade from version 3](https://github.com/davidjbradshaw/iframe-resizer/blob/master/docs/upgrade.md)
93
- - [Version history](https://github.com/davidjbradshaw/iframe-resizer/blob/master/CHANGELOG.md)
94
-
95
- ## License
96
-
97
- Copyright &copy; 2013-23 [David J. Bradshaw](https://github.com/davidjbradshaw) -
98
- Licensed under the [MIT License](LICENSE)
99
-
100
- <!--
101
- [![NPM](https://nodei.co/npm/iframe-resizer.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/iframe-resizer/)
102
-
103
- [![Build Status](https://travis-ci.org/davidjbradshaw/iframe-resizer.svg?branch=master)](https://travis-ci.org/davidjbradshaw/iframe-resizer)
104
- [![Known Vulnerabilities](https://snyk.io/test/github/davidjbradshaw/iframe-resizer/badge.svg)](https://snyk.io/test/github/davidjbradshaw/iframe-resizer)
105
- -->
12
+ ---
13
+ Copyright &copy; 2013-24 [David J. Bradshaw](https://github.com/davidjbradshaw)
package/package.json CHANGED
@@ -1,16 +1,10 @@
1
1
  {
2
2
  "name": "iframe-resizer",
3
- "version": "4.3.11",
4
- "homepage": "https://github.com/davidjbradshaw/iframe-resizer",
3
+ "version": "4.4.0",
4
+ "homepage": "https://iframe-resizer.com",
5
5
  "authors": [
6
6
  "David J. Bradshaw <dave@bradshaw.net>"
7
7
  ],
8
- "maintainers": [
9
- {
10
- "name": "David J. Bradshaw",
11
- "email": "dave@bradshaw.net"
12
- }
13
- ],
14
8
  "scripts": {
15
9
  "build": "grunt build",
16
10
  "eslint": "eslint *.js src/* --color",
@@ -19,7 +13,7 @@
19
13
  "test": "grunt travis",
20
14
  "upgrade": "npm-check-updates -u && npm install && npm run test"
21
15
  },
22
- "description": "Keep same and cross domain iFrames sized to their content with support for window/content resizing, and multiple iFrames.",
16
+ "description": "This package has now been split into two separate packages. Please use '@iframe-resizer/parent' and '@iframe-resizer/child' for new projects. This package will continue to be maintained for existing projects.",
23
17
  "repository": {
24
18
  "type": "git",
25
19
  "url": "https://github.com/davidjbradshaw/iframe-resizer.git"
@@ -27,7 +21,7 @@
27
21
  "github": "https://github.com/davidjbradshaw/iframe-resizer",
28
22
  "funding": {
29
23
  "type": "individual",
30
- "url": "https://github.com/davidjbradshaw/iframe-resizer/blob/master/FUNDING.md"
24
+ "url": "https://iframe-resizer.com/licenses/"
31
25
  },
32
26
  "devDependencies": {
33
27
  "cosmiconfig": "^9.0.0",
@@ -113,7 +107,7 @@
113
107
  "engines": {
114
108
  "node": ">=0.8.0"
115
109
  },
116
- "license": "MIT",
110
+ "license": "GPL-3.0",
117
111
  "keywords": [
118
112
  "CrossDomain",
119
113
  "Cross-Domain",
@@ -133,4 +127,4 @@
133
127
  "responsive-iframes",
134
128
  "jquery-plugin"
135
129
  ]
136
- }
130
+ }