| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | /*! | |
| 2 | 2 | * PayPalJSButtons | |
| 3 | 3 | * JavaScript integration for PayPal's payment buttons | |
| 4 | - * @version 1.0.1 - 2013-03-30 | ||
| 4 | + * @version 1.0.1 - 2013-04-03 | ||
| 5 | 5 | * @author Jeff Harrell <https://github.com/jeffharrell/> | |
| 6 | 6 | */ | |
| 7 | 7 | /*! | |
@@ -1937,7 +1937,12 @@ PAYPAL.apps = PAYPAL.apps || {}; | |||
| 1937 | 1937 | form.appendChild(child); | |
| 1938 | 1938 | } | |
| 1939 | 1939 | ||
| 1940 | - btn.type = 'submit'; | ||
| 1940 | + // Safari won't let you set read-only attributes on buttons. | ||
| 1941 | + try { | ||
| 1942 | + btn.type = 'submit'; | ||
| 1943 | + } catch (e) { | ||
| 1944 | + btn.setAttribute('type', 'submit'); | ||
| 1945 | + } | ||
| 1941 | 1946 | btn.className = 'paypal-button ' + size; | |
| 1942 | 1947 | btn.appendChild(document.createTextNode(localeText[type])); | |
| 1943 | 1948 | ||
@@ -1972,7 +1977,7 @@ PAYPAL.apps = PAYPAL.apps || {}; | |||
| 1972 | 1977 | css = ''; | |
| 1973 | 1978 | styleEl = document.createElement('style'); | |
| 1974 | 1979 | paypalButton = '.paypal-button'; | |
| 1975 | - paypalInput = paypalButton + ' button[type=submit]'; | ||
| 1980 | + paypalInput = paypalButton + ' button'; | ||
| 1976 | 1981 | ||
| 1977 | 1982 | css += paypalButton + ' { white-space: nowrap; }'; | |
| 1978 | 1983 | css += paypalInput + ' { white-space: nowrap; overflow: hidden; border-radius: 13px; font-family: "Arial", bold, italic; font-weight: bold; font-style: italic; border: 1px solid #ffa823; color: #0E3168; background: #ffa823; position: relative; text-shadow: 0 1px 0 rgba(255,255,255,.5); cursor: pointer; z-index: 0; }'; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | /*! | |
| 2 | 2 | * PayPalJSButtons | |
| 3 | 3 | * JavaScript integration for PayPal's payment buttons | |
| 4 | - * @version 1.0.1 - 2013-03-30 | ||
| 4 | + * @version 1.0.1 - 2013-04-03 | ||
| 5 | 5 | * @author Jeff Harrell <https://github.com/jeffharrell/> | |
| 6 | 6 | */ | |
| 7 | 7 | if (typeof PAYPAL === 'undefined' || !PAYPAL) { | |
@@ -204,7 +204,12 @@ PAYPAL.apps = PAYPAL.apps || {}; | |||
| 204 | 204 | form.appendChild(child); | |
| 205 | 205 | } | |
| 206 | 206 | ||
| 207 | - btn.type = 'submit'; | ||
| 207 | + // Safari won't let you set read-only attributes on buttons. | ||
| 208 | + try { | ||
| 209 | + btn.type = 'submit'; | ||
| 210 | + } catch (e) { | ||
| 211 | + btn.setAttribute('type', 'submit'); | ||
| 212 | + } | ||
| 208 | 213 | btn.className = 'paypal-button ' + size; | |
| 209 | 214 | btn.appendChild(document.createTextNode(localeText[type])); | |
| 210 | 215 | ||
@@ -239,7 +244,7 @@ PAYPAL.apps = PAYPAL.apps || {}; | |||
| 239 | 244 | css = ''; | |
| 240 | 245 | styleEl = document.createElement('style'); | |
| 241 | 246 | paypalButton = '.paypal-button'; | |
| 242 | - paypalInput = paypalButton + ' button[type=submit]'; | ||
| 247 | + paypalInput = paypalButton + ' button'; | ||
| 243 | 248 | ||
| 244 | 249 | css += paypalButton + ' { white-space: nowrap; }'; | |
| 245 | 250 | css += paypalInput + ' { white-space: nowrap; overflow: hidden; border-radius: 13px; font-family: "Arial", bold, italic; font-weight: bold; font-style: italic; border: 1px solid #ffa823; color: #0E3168; background: #ffa823; position: relative; text-shadow: 0 1px 0 rgba(255,255,255,.5); cursor: pointer; z-index: 0; }'; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments