Progress Continues
We've already had 21785 updates since Dolphin 5.0. Keep up with Dolphin's continuing progress through the Dolphin Blog: February, March, and April 2024 Dolphin Progress Report. |
The Dolphin Emulator Wiki needs your help! Dolphin can play thousands of games, and changes are happening all the time. Help us keep up! Join in and help us make this the best resource for Dolphin. |
MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
(Added Test if an element has a certain class) |
(After messing around and trying to implement this using pure CSS, it'll be easy to use some JS alongside the CSS...) |
||
Line 219: | Line 219: | ||
$( createNavigationBarToggleButton ); | $( createNavigationBarToggleButton ); | ||
// JS function to truncate text of the captions used in Template:YouTube and Template:Image (when called by the template) | |||
var gtcp=$('#gallerythumb_caption p'); | |||
var gtcdivh=$('#gallerythumb_caption').height(); | |||
while ($(gtcp).outerHeight()>gtcdivh) { | |||
$(gtcp).text(function (index, text) { | |||
return text.replace(/\W*\s(\S)*$/, '...'); | |||
}); | |||
} |