Index: branches/js2-work/phase3/js2/mwEmbed/mwEmbed.js |
— | — | @@ -1615,7 +1615,7 @@ |
1616 | 1616 | var mwpath = null; |
1617 | 1617 | |
1618 | 1618 | // Check for direct include of the mwEmbed.js |
1619 | | - if ( src.indexOf( 'mwEmbed.js' ) !== -1 && src.indexOf( 'MediaWiki:Gadget') == -1) { |
| 1619 | + if ( src.indexOf( 'mwEmbed.js' ) !== -1 ) { |
1620 | 1620 | mwpath = src.substr( 0, src.indexOf( 'mwEmbed.js' ) ); |
1621 | 1621 | } |
1622 | 1622 | |
— | — | @@ -1738,9 +1738,13 @@ |
1739 | 1739 | // Check for mwEmbed.js and/or script loader |
1740 | 1740 | var src = js_elements[i].getAttribute( "src" ); |
1741 | 1741 | if ( src ) { |
1742 | | - if ( src.indexOf( 'mwEmbed.js' ) !== -1 || ( |
1743 | | - ( src.indexOf( 'mwScriptLoader.php' ) !== -1 || src.indexOf( 'jsScriptLoader.php' ) !== -1 ) |
1744 | | - && src.indexOf( 'mwEmbed' ) !== -1 ) ) // (check for class=mwEmbed script_loader call) |
| 1742 | + if ( |
| 1743 | + ( src.indexOf( 'mwEmbed.js' ) !== -1 && src.indexOf( 'MediaWiki:Gadget') == -1 ) |
| 1744 | + || |
| 1745 | + ( |
| 1746 | + ( src.indexOf( 'mwScriptLoader.php' ) !== -1 || src.indexOf( 'jsScriptLoader.php' ) !== -1 ) |
| 1747 | + && src.indexOf( 'mwEmbed' ) !== -1 ) |
| 1748 | + ) |
1745 | 1749 | { |
1746 | 1750 | mwEmbedSrc = src; |
1747 | 1751 | return mwEmbedSrc; |