j1m_app 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.md +21 -0
  3. data/README.md +41 -0
  4. data/_data/modules/default/j1_app-0.0.1/j1_iframe_resizer.yml +270 -0
  5. data/_data/resources/default/j1_app-0.0.1/resource.yml +22 -0
  6. data/assets/themes/j1/iframe_resizer/.npmignore +9 -0
  7. data/assets/themes/j1/iframe_resizer/.travis.yml +6 -0
  8. data/assets/themes/j1/iframe_resizer/CONTRIBUTING.md +86 -0
  9. data/assets/themes/j1/iframe_resizer/Iframe-resizer by davidjbradshaw.url +2 -0
  10. data/assets/themes/j1/iframe_resizer/LICENSE +21 -0
  11. data/assets/themes/j1/iframe_resizer/README.md +608 -0
  12. data/assets/themes/j1/iframe_resizer/bower.json +45 -0
  13. data/assets/themes/j1/iframe_resizer/example/frame.absolute.html +88 -0
  14. data/assets/themes/j1/iframe_resizer/example/frame.content.html +58 -0
  15. data/assets/themes/j1/iframe_resizer/example/frame.hover.html +51 -0
  16. data/assets/themes/j1/iframe_resizer/example/frame.nested.html +72 -0
  17. data/assets/themes/j1/iframe_resizer/example/frame.textarea.html +46 -0
  18. data/assets/themes/j1/iframe_resizer/example/frame.tolerance.html +79 -0
  19. data/assets/themes/j1/iframe_resizer/example/index.html +70 -0
  20. data/assets/themes/j1/iframe_resizer/example/two.html +71 -0
  21. data/assets/themes/j1/iframe_resizer/gruntfile.js +215 -0
  22. data/assets/themes/j1/iframe_resizer/iframeResizer.jquery.json +41 -0
  23. data/assets/themes/j1/iframe_resizer/index.js +4 -0
  24. data/assets/themes/j1/iframe_resizer/js/_client.js +1131 -0
  25. data/assets/themes/j1/iframe_resizer/js/_server.js +1126 -0
  26. data/assets/themes/j1/iframe_resizer/js/ie8.polyfils.js +85 -0
  27. data/assets/themes/j1/iframe_resizer/js/ie8.polyfils.map +1 -0
  28. data/assets/themes/j1/iframe_resizer/js/ie8.polyfils.min.js +4 -0
  29. data/assets/themes/j1/iframe_resizer/js/iframeResizer.contentWindow.js +1104 -0
  30. data/assets/themes/j1/iframe_resizer/js/iframeResizer.contentWindow.map +1 -0
  31. data/assets/themes/j1/iframe_resizer/js/iframeResizer.contentWindow.min.js +10 -0
  32. data/assets/themes/j1/iframe_resizer/js/iframeResizer.js +1007 -0
  33. data/assets/themes/j1/iframe_resizer/js/iframeResizer.js.modified +1004 -0
  34. data/assets/themes/j1/iframe_resizer/js/iframeResizer.map +1 -0
  35. data/assets/themes/j1/iframe_resizer/js/iframeResizer.min.js +9 -0
  36. data/assets/themes/j1/iframe_resizer/js/index.js +2 -0
  37. data/assets/themes/j1/iframe_resizer/karma.conf.js +92 -0
  38. data/assets/themes/j1/iframe_resizer/package.json +111 -0
  39. data/assets/themes/j1/iframe_resizer/spec/_initSpec.js +63 -0
  40. data/assets/themes/j1/iframe_resizer/spec/anchorSpec.js +62 -0
  41. data/assets/themes/j1/iframe_resizer/spec/childSpec.js +403 -0
  42. data/assets/themes/j1/iframe_resizer/spec/closeSpecSpec.js +44 -0
  43. data/assets/themes/j1/iframe_resizer/spec/getPageInfoSpec.js +32 -0
  44. data/assets/themes/j1/iframe_resizer/spec/initCssSpec.js +28 -0
  45. data/assets/themes/j1/iframe_resizer/spec/initDomSpec.js +27 -0
  46. data/assets/themes/j1/iframe_resizer/spec/initDoubleCallSpec.js +33 -0
  47. data/assets/themes/j1/iframe_resizer/spec/initErrorSpec.js +57 -0
  48. data/assets/themes/j1/iframe_resizer/spec/initJQuerySpec.js +29 -0
  49. data/assets/themes/j1/iframe_resizer/spec/initUndefinedDomSpec.js +25 -0
  50. data/assets/themes/j1/iframe_resizer/spec/javascripts/fixtures/iframe.html +2 -0
  51. data/assets/themes/j1/iframe_resizer/spec/javascripts/fixtures/iframe600.html +4 -0
  52. data/assets/themes/j1/iframe_resizer/spec/javascripts/fixtures/iframe600WithId.html +4 -0
  53. data/assets/themes/j1/iframe_resizer/spec/lib/common.js +59 -0
  54. data/assets/themes/j1/iframe_resizer/spec/parentSpec.js +88 -0
  55. data/assets/themes/j1/iframe_resizer/spec/resources/djb.jpg +0 -0
  56. data/assets/themes/j1/iframe_resizer/spec/resources/frame.content.html +176 -0
  57. data/assets/themes/j1/iframe_resizer/spec/resources/frame.lateload.html +33 -0
  58. data/assets/themes/j1/iframe_resizer/spec/resources/frame.nested.html +40 -0
  59. data/assets/themes/j1/iframe_resizer/spec/scrollSpec.js +53 -0
  60. data/assets/themes/j1/iframe_resizer/spec/sendMessageSpec.js +58 -0
  61. data/assets/themes/j1/iframe_resizer/spec/support/jasmine.json +9 -0
  62. data/assets/themes/j1/iframe_resizer/src/ie8.polyfils.js +64 -0
  63. data/assets/themes/j1/iframe_resizer/src/iframeResizer.contentWindow.js +1123 -0
  64. data/assets/themes/j1/iframe_resizer/src/iframeResizer.js +1002 -0
  65. data/assets/themes/j1/iframe_resizer/test-main.js +33 -0
  66. data/assets/themes/j1/iframe_resizer/test/_init.html +44 -0
  67. data/assets/themes/j1/iframe_resizer/test/_init_once.html +45 -0
  68. data/assets/themes/j1/iframe_resizer/test/_init_once_async.html +72 -0
  69. data/assets/themes/j1/iframe_resizer/test/background.html +47 -0
  70. data/assets/themes/j1/iframe_resizer/test/changePage.html +50 -0
  71. data/assets/themes/j1/iframe_resizer/test/close.html +44 -0
  72. data/assets/themes/j1/iframe_resizer/test/getId.html +44 -0
  73. data/assets/themes/j1/iframe_resizer/test/interval.html +56 -0
  74. data/assets/themes/j1/iframe_resizer/test/jqueryNoConflict.html +47 -0
  75. data/assets/themes/j1/iframe_resizer/test/lateImageLoad.html +90 -0
  76. data/assets/themes/j1/iframe_resizer/test/margin.html +73 -0
  77. data/assets/themes/j1/iframe_resizer/test/mutationObserver.html +63 -0
  78. data/assets/themes/j1/iframe_resizer/test/nested.html +46 -0
  79. data/assets/themes/j1/iframe_resizer/test/resize.contentWidth.html +51 -0
  80. data/assets/themes/j1/iframe_resizer/test/resize.width.html +63 -0
  81. data/assets/themes/j1/iframe_resizer/test/resources/djb.jpg +0 -0
  82. data/assets/themes/j1/iframe_resizer/test/resources/frame.content.html +191 -0
  83. data/assets/themes/j1/iframe_resizer/test/resources/frame.lateload.html +33 -0
  84. data/assets/themes/j1/iframe_resizer/test/resources/frame.nested.html +40 -0
  85. data/assets/themes/j1/iframe_resizer/test/resources/jquery.js +6 -0
  86. data/assets/themes/j1/iframe_resizer/test/resources/qunit.css +244 -0
  87. data/assets/themes/j1/iframe_resizer/test/resources/qunit.js +2212 -0
  88. data/assets/themes/j1/iframe_resizer/test/resources/require.js +2103 -0
  89. data/assets/themes/j1/iframe_resizer/test/resources/testLib.js +9 -0
  90. data/assets/themes/j1/iframe_resizer/test/scrolling.html +65 -0
  91. data/assets/themes/j1/iframe_resizer/test/sendMessage.html +61 -0
  92. data/assets/themes/j1/iframe_resizer/test/setHeightCalculationMethod.html +51 -0
  93. data/assets/themes/j1/iframe_resizer/test/size.html +64 -0
  94. data/assets/themes/j1/iframe_resizer/test/v1.html +189 -0
  95. data/exe/console +14 -0
  96. data/exe/setup +8 -0
  97. data/lib/j1m_app.rb +5 -0
  98. data/lib/j1m_app/version.rb +3 -0
  99. metadata +187 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7e980003c525250fb7098f07bf150b12c08f148a
4
+ data.tar.gz: 605cbfcc2c402372c1c3461d6d8597c342864889
5
+ SHA512:
6
+ metadata.gz: 9795e63582c90b8b61bfac4640c6ddc9ae47012137b2612e88be5dcb08b043eb785816167b95c14c6cd1c825a46860029fc203449fbb7320a3c7a8e9562a3d82
7
+ data.tar.gz: e52a953b9a3f026a00582c7e2d4408f1fb536fe5f714370a3244819299a7b0168881833f7bd830353dca69d78e6a892437453a28669975a7bc73d164316d541e
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Juergen Adams
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # J1mNav
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/j1m_nav`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'j1m_nav'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install j1m_nav
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/j1m_nav.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
@@ -0,0 +1,270 @@
1
+ # ------------------------------------------------------------------------------
2
+ # J1: ~/_data/modules/j1_iframe_resizer.yml
3
+ # J1 iFrameResizer specific configuration data (APP Module)
4
+ #
5
+ # Product/Info:
6
+ # https://jekyll.one
7
+ #
8
+ # Copyright (C) 2017 Juergen Adams
9
+ #
10
+ # J1 Template is licensed under the MIT License.
11
+ # For details, see https://jekyll.one
12
+ #
13
+ # ------------------------------------------------------------------------------
14
+
15
+ # GENERAL settings
16
+ # -------------------------------------------------------------------------
17
+
18
+ # version
19
+ # --------------------------------------------------------------------
20
+ # Current version of the module
21
+ #
22
+ # values: string
23
+ # default: no defaults
24
+ #
25
+ version: 0.0.1
26
+
27
+ # MODULE settings
28
+ # -------------------------------------------------------------------------
29
+
30
+ # DEFAULT settings
31
+ # --------------------------------------------------------------------
32
+ #
33
+ # log
34
+ # --------------------------------------------------------------------
35
+ # Setting the log option to true will make the scripts in both
36
+ # the host page and the iFrame output everything they do to the
37
+ # JavaScript console so you can see the communication between the
38
+ # two scripts.
39
+ #
40
+ # values: boolean (true|false)
41
+ # default: false
42
+ #
43
+ # autoResize
44
+ # --------------------------------------------------------------------
45
+ # When enabled changes to the Window size or the DOM will cause
46
+ # the iFrame to resize to the new content size. Disable if using
47
+ # size method with custom dimensions.
48
+ #
49
+ # values: boolean (true|false)
50
+ # default: true
51
+ #
52
+ # bodyBackground
53
+ # --------------------------------------------------------------------
54
+ # Overrides the body background style in the iFrame.
55
+ #
56
+ # values: string
57
+ # default: null
58
+ #
59
+ # bodyMargin
60
+ # --------------------------------------------------------------------
61
+ # Override the default body margin style in the iFrame. A string
62
+ # can be any valid value for the CSS margin attribute, for example
63
+ # '8px 3em'. A number value is converted into px.
64
+ #
65
+ # values: integer
66
+ # default: 0
67
+ #
68
+ # checkOrigin
69
+ # --------------------------------------------------------------------
70
+ # When set to true, only allow incoming messages from the domain
71
+ # listed in the src property of the iFrame tag. If your iFrame
72
+ # navigates between different domains, ports or protocols; then
73
+ # you will need to provide an array of URLs or disable this option.
74
+ #
75
+ # values: boolean (true|false)
76
+ # default: true
77
+ #
78
+ # inPageLinks
79
+ # --------------------------------------------------------------------
80
+ # When enabled in page linking inside the iFrame and from the
81
+ # iFrame to the parent page will be enabled.
82
+ #
83
+ # values: boolean (true|false)
84
+ # default: false
85
+ #
86
+ # interval
87
+ # --------------------------------------------------------------------
88
+ # Browsers that doesn't support mutationObserver, such as IE10,
89
+ # the library falls back to use setInterval, to check for changes
90
+ # of the page size. The default value is set to 2 frame refreshes
91
+ # at 60Hz, setting this to a higher value will make screen redraws
92
+ # noticeable to the user.
93
+ #
94
+ # Setting this property to a negative number will force the interval
95
+ # check to run instead of mutationObserver. Set to zero to disable.
96
+ #
97
+ # values: integer (msec)
98
+ # default: 32
99
+ #
100
+ # heightCalculationMethod
101
+ # --------------------------------------------------------------------
102
+ # By default the height of the iFrame is calculated by converting
103
+ # the margin of the body to px and then adding the top and bottom
104
+ # figures to the offsetHeight of the body tag.
105
+ #
106
+ # In cases where CSS styles causes the content to flow outside the
107
+ # body you may need to change this setting to one of the following
108
+ # options. Each can give different values depending on how CSS is
109
+ # used in the page and each has varying side-effects. You will need
110
+ # to experiment to see which is best for any particular
111
+ # circumstance.
112
+ #
113
+ # bodyScroll: uses document.body.scrollHeight
114
+ # documentElementOffset: uses document.documentElement.offsetHeight
115
+ # documentElementScroll: uses document.documentElement.scrollHeight
116
+ # max: takes the largest value of the main four options
117
+ # min: takes the smallest value of the main four options
118
+ # grow: same as max but disables the double resize that
119
+ # is used to workout if the iFrame needs to shrink.
120
+ # This provides much better performance if your
121
+ # iFrame will only ever increase in size
122
+ # lowestElement: Loops though every element in the the DOM and
123
+ # finds the lowest bottom point
124
+ # taggedElement: Finds the bottom of the lowest element with a
125
+ # data-iframe-height attribute
126
+ # Note:
127
+ # If the default option doesn't work then the best solutions
128
+ # is to either to use taggedElement, or to use lowestElement
129
+ # in modern browsers and max in IE10 downwards.
130
+ #
131
+ # values: bodyOffset|bodyScroll|documentElementOffset|
132
+ # documentElementScroll|max|min|grow|lowestElement|
133
+ # taggedElement
134
+ # default: bodyOffset
135
+ #
136
+ # maxHeight
137
+ # --------------------------------------------------------------------
138
+ # Set maximum height of an iFrame
139
+ #
140
+ # values: integer
141
+ # default: infinite
142
+ #
143
+ # minHeight
144
+ # --------------------------------------------------------------------
145
+ # Set minimum height of an iFrame
146
+ #
147
+ # values: integer
148
+ # default: 0
149
+ #
150
+ # maxWidth
151
+ # --------------------------------------------------------------------
152
+ # Set maximum width of an iFrame
153
+ #
154
+ # values: integer
155
+ # default: infinite
156
+ #
157
+ # minWidth
158
+ # --------------------------------------------------------------------
159
+ # Set minimum width of an iFrame
160
+ #
161
+ # values: integer
162
+ # default: 0
163
+ #
164
+ # resizeFrom
165
+ # --------------------------------------------------------------------
166
+ # Listen for resize events from the parent page, or the iFrame.
167
+ # Select the 'child' value if the iFrame can be resized
168
+ # independently of the browser window. Selecting this value can
169
+ # cause issues with some height calculation methods on mobile
170
+ # devices.
171
+ #
172
+ # values: parent|child
173
+ # default: parent
174
+ #
175
+ # scrolling
176
+ # --------------------------------------------------------------------
177
+ # Enable scroll-bars for an iFrame
178
+ #
179
+ # values: boolean (true|false)
180
+ # default: false
181
+ #
182
+ # sizeHeight
183
+ # --------------------------------------------------------------------
184
+ # Resize an iFrame to it's content height
185
+ #
186
+ # values: boolean (true|false)
187
+ # default: true
188
+ #
189
+ # sizeWidth
190
+ # --------------------------------------------------------------------
191
+ # Resize an iFrame to it's content width
192
+ #
193
+ # values: boolean (true|false)
194
+ # default: false
195
+ #
196
+ # tolerance
197
+ # --------------------------------------------------------------------
198
+ # Set the number of pixels the iFrame content size has to change
199
+ # by, before triggering a resize of the iFrame.
200
+ #
201
+ # values: integer
202
+ # default: 0
203
+ #
204
+ # widthCalculationMethod
205
+ # --------------------------------------------------------------------
206
+ # By default the width of the page is worked out by taking the
207
+ # greater of the documentElement and body scrollWidth values.
208
+ #
209
+ # Some CSS technics may require you to change this setting to
210
+ # one of the following options. Each can give different values
211
+ # depending on how CSS is used in the page and each has varying
212
+ # side-effects. You will need to experiment to see which is best
213
+ # for any particular circumstance.
214
+ #
215
+ # bodyOffset: uses document.body.offsetWidth
216
+ # bodyScroll: uses document.body.scrollWidth
217
+ # documentElementOffset: uses document.documentElement.offsetWidth
218
+ # documentElementScroll: uses document.documentElement.scrollWidth
219
+ # scroll: use the largest value of the two scroll options
220
+ # max: use the largest value of the main four options
221
+ # min: use the lowest value of the main four options
222
+ # rightMostElement: Loops though every element in the the DOM and
223
+ # finds the right most point
224
+ # taggedElement: Finds the most left element with a data-iframe-width
225
+ # attribute
226
+ # Note:
227
+ # The rightMostElement option is the most reliable way of
228
+ # determining the page width. However, it does have a
229
+ # performance impact in older versions of IE. In one screen
230
+ # refresh (16ms) Chrome can calculate the position of around
231
+ # 10,000 html nodes, whereas IE 8 can calculate approximately 50.
232
+ # The taggedElement option provides much greater performance
233
+ # by limiting the number of elements that need their position
234
+ # checked.
235
+ #
236
+ # The bodyScroll, documentElementScroll, max and min options
237
+ # can cause screen flicker and will prevent the interval trigger
238
+ # downsizing the iFrame when the content shrinks. This is mainly
239
+ # an issue in IE 10 and below, where the mutationObserver event
240
+ # is not supported. To overcome this you need to manually trigger
241
+ # a page resize by calling the parentIFrame.size() method when
242
+ # you remove content from the page.
243
+ #
244
+ # values: bodyOffset|bodyScroll|documentElementOffset|
245
+ # documentElementScroll|max|min|scroll|
246
+ # rightMostElement|taggedElement
247
+ # default: scroll
248
+ #
249
+
250
+ defaults:
251
+
252
+ log: false
253
+ autoResize: true
254
+ bodyBackground:
255
+ bodyMargin: 0
256
+ checkOrigin: true
257
+ inPageLinks: false
258
+ interval: 32
259
+ heightCalculationMethod: bodyOffset
260
+ maxHeight: 100000000
261
+ minHeight: 150
262
+ maxWidth: 100000000
263
+ minWidth: 0
264
+ resizeFrom: parent
265
+ scrolling: false
266
+ sizeHeight: true
267
+ sizeWidth: false
268
+ tolerance: 0
269
+ widthCalculationMethod: scroll
270
+
@@ -0,0 +1,22 @@
1
+
2
+ # -------------------------------------------------------------
3
+ # iFrameResizer (APP Module)
4
+ #
5
+ - resource:
6
+ enabled: true
7
+ version: 0.0.1
8
+ id: j1_iframe_resizer
9
+ comment: Resources for iFrameResizer
10
+ layout: [ page, post, app ]
11
+ region: head
12
+ required: ondemand
13
+ script_load: defer
14
+ data:
15
+ css: []
16
+ files: [
17
+ j1/js/adapters/iframe_resizer.js
18
+ ]
19
+ js: [
20
+ iframe_resizer/js/iframeResizer
21
+ ]
22
+ init_function: iFrameResizer.init
@@ -0,0 +1,9 @@
1
+ .DS_Store
2
+ .coveralls.yml
3
+ node_modules
4
+ bin
5
+ example/test.html
6
+ test/*.off
7
+ npm-debug.log
8
+ bower_components
9
+ coverage*
@@ -0,0 +1,6 @@
1
+ language: node_js
2
+ node_js:
3
+ - "4.1"
4
+ before_script:
5
+ - npm install -g grunt-cli
6
+ sudo: false
@@ -0,0 +1,86 @@
1
+ # Contributing to iframe-resizer
2
+
3
+ Looking to contribute something? **Here's how you can help.**
4
+
5
+ Please take a moment to review this document in order to make the contribution
6
+ process easy and effective for everyone involved.
7
+
8
+ ## Using the issue tracker
9
+
10
+ The [issue tracker](https://github.com/davidjbradshaw/iframe-resizer/issues) is
11
+ the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests)
12
+ and [submitting pull requests](#pull-requests).
13
+
14
+ **Please do not use the issue tracker for personal support requests. These should be raised on
15
+ Stack Overflow ([`iframe-resizer`](http://stackoverflow.com/questions/tagged/iframe-resizer) tag).**
16
+
17
+
18
+ ## Bug reports
19
+
20
+ A bug is a _demonstrable problem_ that is caused by the code in the repository.
21
+ Good bug reports are extremely helpful, so thanks!
22
+
23
+ Guidelines for bug reports:
24
+
25
+ 0. **Lint your code** — Use [jshint](http://jshint.com/)
26
+ to ensure your problem isn't caused by a simple error in your own code.
27
+
28
+ 1. **Use the GitHub issue search** — check if the issue has already been
29
+ reported.
30
+
31
+ 2. **Check if the issue has been fixed** — try to reproduce it using the
32
+ latest `master` or development branch in the repository.
33
+
34
+ 3. **Isolate the problem** — ideally create a [reduced test
35
+ case](https://css-tricks.com/reduced-test-cases/) and a live example.
36
+
37
+
38
+ A good bug report shouldn't leave others needing to chase you up for more
39
+ information. Please try to be as detailed as possible in your report. What is
40
+ your environment? What steps will reproduce the issue? What browser(s) and OS
41
+ experience the problem? Do other browsers show the bug differently? What
42
+ would you expect to be the outcome? All these details will help people to fix
43
+ any potential bugs.
44
+
45
+ Example:
46
+
47
+ > Short and descriptive example bug report title
48
+ >
49
+ > A summary of the issue and the browser/OS environment in which it occurs. If
50
+ > suitable, include the steps required to reproduce the bug.
51
+ >
52
+ > 1. This is the first step
53
+ > 2. This is the second step
54
+ > 3. Further steps, etc.
55
+ >
56
+ > `<url>` - a link to the reduced test case
57
+ >
58
+ > Any other information you want to share that is relevant to the issue being
59
+ > reported. This might include the lines of code that you have identified as
60
+ > causing the bug, and potential solutions (and your opinions on their
61
+ > merits).
62
+
63
+ ## Feature requests
64
+
65
+ Feature requests are welcome. But take a moment to find out whether your idea
66
+ fits with the scope and aims of the project.
67
+
68
+
69
+ ## Pull requests
70
+
71
+ Good pull requests—patches, improvements, new features—are a fantastic
72
+ help. They should remain focused in scope and avoid containing unrelated
73
+ commits.
74
+
75
+ **Please ask first** before embarking on any significant pull request (e.g.
76
+ implementing features or refactoring code),
77
+ otherwise you risk spending a lot of time working on something that the
78
+ project's developers might not want to merge into the project.
79
+
80
+ In lieu of a formal style-guide, take care to maintain the existing coding
81
+ style. Add unit tests for any new or changed functionality. Lint and test
82
+ your code using [Grunt](http://gruntjs.com/).
83
+
84
+ ## License
85
+
86
+ By contributing your code, you agree to license your contribution under the [MIT License](LICENSE).