| @@ -1,0 +1,20 @@ | ||
| 1 | +( function ( w, d, c, j ) { | |
| 2 | + if ( | |
| 3 | + w.crowdsignal_shortcode_options && | |
| 4 | + w.crowdsignal_shortcode_options.script_url && | |
| 5 | + ! d.getElementById( j ) | |
| 6 | + ) { | |
| 7 | + var pd = d.createElement( c ), | |
| 8 | + s; | |
| 9 | + pd.id = j; | |
| 10 | + pd.async = true; | |
| 11 | + pd.src = w.crowdsignal_shortcode_options.script_url; | |
| 12 | + s = d.getElementsByTagName( c )[ 0 ]; | |
| 13 | + s.parentNode.insertBefore( pd, s ); | |
| 14 | + } else if ( typeof w.jQuery !== 'undefined' ) { | |
| 15 | + // In environments where jQuery is present, dispatch with jQuery. | |
| 16 | + w.jQuery( d.body ).trigger( 'pd-script-load' ); | |
| 17 | + } else { | |
| 18 | + d.body.dispatchEvent( new Event( 'pd-script-load' ) ); | |
| 19 | + } | |
| 20 | +} )( window, document, 'script', 'pd-polldaddy-loader' ); | |