Index: trunk/extensions/CodeEditor/modules/jquery.codeEditor.js |
— | — | @@ -70,7 +70,8 @@ |
71 | 71 | */ |
72 | 72 | context.fn = $.extend( context.fn, { |
73 | 73 | 'codeEditorToolbarIcon': function() { |
74 | | - var iconPath = wgExtensionAssetsPath + '/CodeEditor/images/'; |
| 74 | + // When loaded as a gadget, one may need to override the wiki's own assets path. |
| 75 | + var iconPath = mw.config.get('wgCodeEditorAssetsPath', mw.config.get('wgExtensionAssetsPath')) + '/CodeEditor/images/'; |
75 | 76 | return iconPath + (context.codeEditorActive ? 'code-selected.png' : 'code.png'); |
76 | 77 | }, |
77 | 78 | 'setupCodeEditorToolbar': function() { |