Code simplification

master
Andrew Z 2024-12-07 21:59:16 -05:00
parent 125438959b
commit a37c106740
3 changed files with 6 additions and 18 deletions

View File

@ -2209,31 +2209,19 @@ function updateDisplay(content) {
$(this).html(description + "... <span class='card_readmore'>"+readMoreText+"</span>");
}
});
$(".ca_applicationName").each(function() {
var newSize = 100;
while (isOverflown(this)) {
var existingSize = $(this).css("font-size");
var size = parseInt(existingSize);
if ( size == newSize + 1 ) { // looks like browsers in Chinese have a minimum enforced font-size
break;
}
var newSize = size - 1;
if (newSize == 8)
break;
$(this).css("font-size",newSize+"px");
}
});
$(".betaPopupText,.installedCardText,.upgradePopupText,.ltofficialPopupText").each(function() {
$(".betaPopupText,.installedCardText,.upgradePopupText,.ltofficialPopupText,.ca_applicationName").each(function() {
var newSize = 100;
while (isOverflown(this,true)) {
var minSize = $(this).hasClass("ca_applicationName") ? 8 : 0;
var overflowType = ! $(this).hasClass("ca_applicationName");
while (isOverflown(this,overflowType)) {
var existingSize = $(this).css("font-size");
var size = parseInt(existingSize);
if ( size == newSize + 1 ) { // looks like browsers in Chinese have a minimum enforced font-size
break;
}
var newSize = size - 1;
if (newSize == 0)
if (newSize == minSize)
break;
$(this).css("font-size",newSize+"px");

View File

@ -1,4 +1,4 @@
61eb082eb073f58ec1d750af5b7ab9d1 ./Apps.page
6d52983f6de684c11e819965f71c619a ./Apps.page
2defe45163697e40c813a57ae9a50231 ./CA_notices.page
c12622d8281346d37398e96cbb6b8b69 ./ca_settings.page
01ed7990078dee7cecfeda9a4e49377e ./default.cfg