Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: starfishmod/jquery-oembed-all
base: 3deec2e3a6
...
head fork: starfishmod/jquery-oembed-all
compare: 8ea1f9e87b
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 08, 2012
@real34 real34 Added support for default values for maxwidth / height in the case th…
…e params are not defined - closes #15
f865917
@starfishmod Merge pull request #16 from real34/fix-default-maxsize
Added support for default values for maxwidth / height in the case the p...
8ea1f9e
Showing with 6 additions and 2 deletions.
  1. +6 −2 jquery.oembed.js
View
8 jquery.oembed.js
@@ -78,9 +78,13 @@
url += (url.indexOf("?") <= 0) ? "?" : "&";
url = url.replace('#','%23');
- if (provider.maxWidth !== null && provider.params.maxwidth === null) provider.params.maxwidth = provider.maxWidth;
+ if (provider.maxWidth !== null && (typeof provider.params.maxwidth === 'undefined' || provider.params.maxwidth === null)) {
+ provider.params.maxwidth = provider.maxWidth;
+ }
- if (provider.maxHeight !== null && provider.params.maxheight === null) provider.params.maxheight = provider.maxHeight;
+ if (provider.maxHeight !== null && (typeof provider.params.maxheight === 'undefined' || provider.params.maxheight === null)) {
+ provider.params.maxheight = provider.maxHeight;
+ }
for (i in provider.params) {
// We don't want them to jack everything up by changing the callback parameter

No commit comments for this range

Something went wrong with that request. Please try again.