mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-30 12:00:51 +01:00
remove screenshot if screenshot not present
This commit is contained in:
parent
a2d65d01b9
commit
a8e3ccd761
@ -104,8 +104,10 @@ public class StoreExtensionDetailsItem implements ContentItem {
|
|||||||
contentBuilder.append("Warning: this extension has been marked unstable!\n");
|
contentBuilder.append("Warning: this extension has been marked unstable!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
contentBuilder.append("\n*Screenshot: *").append("\n")
|
contentBuilder.append("<div>"
|
||||||
.append("--img:").append(gExtensionStore.getRepository().getResourceUrl("store", "extensions", storeExtension.getTitle(), "screenshot.png"));
|
.append("\n*Screenshot: *").append("\n")
|
||||||
|
.append("--img:").append(gExtensionStore.getRepository().getResourceUrl("store", "extensions", storeExtension.getTitle(), "screenshot.png"))
|
||||||
|
.append("</div>");
|
||||||
|
|
||||||
return contentBuilder.toString();
|
return contentBuilder.toString();
|
||||||
}
|
}
|
||||||
@ -145,7 +147,7 @@ public class StoreExtensionDetailsItem implements ContentItem {
|
|||||||
line = line.replaceAll("\\*([^*]*)\\*", "<b>$1</b>")
|
line = line.replaceAll("\\*([^*]*)\\*", "<b>$1</b>")
|
||||||
.replaceAll("_([^_<>]*)_", "<i>$1</i>")
|
.replaceAll("_([^_<>]*)_", "<i>$1</i>")
|
||||||
.replaceAll("(^| |>)@([^ <>]*)($| |<)", "$1<u>$2</u>$3")
|
.replaceAll("(^| |>)@([^ <>]*)($| |<)", "$1<u>$2</u>$3")
|
||||||
.replaceAll("--img:([^ ]*)", "<img src=\"$1\" alt=\"extension screenshot\">")
|
.replaceAll("--img:([^ ]*)", "<img src=\"$1\" alt=\"extension screenshot\" onerror=\"this.parentNode.remove()\">")
|
||||||
.replaceAll("--url:([^-]*)-(https?:[^ ]*)",
|
.replaceAll("--url:([^-]*)-(https?:[^ ]*)",
|
||||||
String.format("<a href=\"#\" onClick=\"%s.openUrl("$2")\">$1</a>", id));
|
String.format("<a href=\"#\" onClick=\"%s.openUrl("$2")\">$1</a>", id));
|
||||||
// .replaceAll("([^\";])(https?:[^ ]*)",
|
// .replaceAll("([^\";])(https?:[^ ]*)",
|
||||||
|
Loading…
Reference in New Issue
Block a user