Index: trunk/extensions/SemanticForms/libs/SF_ajax_form_preview.js |
— | — | @@ -244,6 +244,8 @@ |
245 | 245 | } |
246 | 246 | } |
247 | 247 | |
248 | | -if (wgAction=='formedit' || wgCanonicalSpecialPageName == 'FormEdit') |
249 | | -// addOnloadHook(ajaxFormPreviewInit); |
250 | | - jQuery(function(){ajaxFormPreviewInit()}); |
| 248 | +if (wgAction=='formedit' || wgCanonicalSpecialPageName == 'FormEdit') { |
| 249 | + if ( typeof( addOnloadHook ) != 'undefined' ) addOnloadHook(ajaxFormPreviewInit); |
| 250 | + else if ( typeof( jQuery ) != 'undefined' ) jQuery(function(){ajaxFormPreviewInit()}); |
| 251 | + // else sorry, no Ajax preview for you |
| 252 | +} |