User:Monster Domosed/common.js: Difference between revisionsGive feedback
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 160: | Line 160: | ||
return char.toUpperCase(); | return char.toUpperCase(); | ||
} ); | } ); | ||
} | } | ||
| Line 224: | Line 210: | ||
} | } | ||
// | // Function to fetch and display the template | ||
function fetchAndShowTemplate() { | |||
new mw.Api().post( { | new mw.Api().post( { | ||
action: 'parse', | action: 'parse', | ||
| Line 259: | Line 242: | ||
} | } | ||
} ); | } ); | ||
} ); | } | ||
// Load template styles only for items (abilities use inline styles) | |||
if ( type === 'item' ) { | |||
loadTemplateStyles( 'Template:Infobox item/styles.css', fetchAndShowTemplate ); | |||
} else { | |||
// For abilities, just fetch and show directly | |||
fetchAndShowTemplate(); | |||
} | |||
}, SHOW_DELAY ); | }, SHOW_DELAY ); | ||