MediaWiki:Gadget-morebits.js: Difference between revisions
Content deleted Content added
MusikAnimal (talk | contribs) Repo at 0d275c4: Fix commentOutImage for multiple files with same params (#1615) |
MusikAnimal (talk | contribs) Repo at b92c23d: load RL modules required for previews |
||
Line 4,750:
var query = {
action: 'parse',
prop: ['text', 'modules'],
pst:
preview: true,
text: wikitext,
title: pageTitle || mw.config.get('wgPageName'),
disablelimitreport: true,
disableeditsection: true,
format: 'json'
};
Line 4,766 ⟶ 4,768:
var fnRenderSuccess = function(apiobj) {
var
var html = response.parse.text;
if (!html) {
apiobj.statelem.error('failed to retrieve preview, or template was blanked');
Line 4,772 ⟶ 4,775:
}
previewbox.innerHTML = html;
mw.loader.load(response.parse.modulestyles);
$(previewbox).find('a').attr('target', '_blank'); // this makes links open in new tab▼
mw.loader.load(response.parse.modules);
// this makes links open in new tab
};
|