MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
// | // Falls das nicht funktioniert, diese Version probieren | ||
$(document).ready(function() { | $(document).ready(function() { | ||
var pageName = mw.config.get('wgPageName'); | var pageName = mw.config.get('wgPageName'); | ||
var protocolsWithExamples = [ | var protocolsWithExamples = [ | ||
'In_vitro_Tyrosine_Kinase_Activity_Assay', | 'In_vitro_Tyrosine_Kinase_Activity_Assay', | ||
| Line 17: | Line 16: | ||
var realExamplePage = pageName + '_Real_Example'; | var realExamplePage = pageName + '_Real_Example'; | ||
// Tab | // Direkt nach dem ersten Tab (Seite) einfügen | ||
var exampleTab = '<li><a href="/wiki/' + realExamplePage + '" title="Real Lab Notebook Example">Example</a></li>'; | var exampleTab = $('<li><a href="/wiki/' + realExamplePage + '" title="Real Lab Notebook Example">Example</a></li>'); | ||
$(' | $('#ca-nstab-main').parent().after(exampleTab); | ||
} | } | ||
}); | }); | ||
Revision as of 16:20, 30 May 2025
// Falls das nicht funktioniert, diese Version probieren
$(document).ready(function() {
var pageName = mw.config.get('wgPageName');
var protocolsWithExamples = [
'In_vitro_Tyrosine_Kinase_Activity_Assay',
'Gentamicin_Protection_Assay',
'LIC_Cloning_(Ligation_independent_cloning)',
'Immunoprecipitation',
'Protein_expression_and_purification',
'Production_of_lentiviral_particles',
'Bacterial_growth_curve'
];
if (protocolsWithExamples.includes(pageName)) {
var realExamplePage = pageName + '_Real_Example';
// Direkt nach dem ersten Tab (Seite) einfügen
var exampleTab = $('<li><a href="/wiki/' + realExamplePage + '" title="Real Lab Notebook Example">Example</a></li>');
$('#ca-nstab-main').parent().after(exampleTab);
}
});