mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 00:40:51 +01:00
Merge branch 'extensionstore' of https://github.com/sirjonasxx/G-Earth into extensionstore
This commit is contained in:
commit
4e3fdda5a9
@ -51,7 +51,7 @@ public class StoreExtensionItem implements ContentItem {
|
||||
.append("<div class=\"overview_item ").append(displayColor(i)).append(" content_item\">")
|
||||
|
||||
.append("<div class=\"overview_item_logo\">")
|
||||
.append("<img src=\"").append(repository.getResourceUrl("store", "extensions", storeExtension.getTitle(), "icon.png")).append("\" alt=\"\">")
|
||||
.append("<img src=\"").append(repository.getResourceUrl("store", "extensions", storeExtension.getTitle(), "icon.png")).append("\" alt=\"\" onerror=\"this.src=").append(repository.getResourceUrl("assets", "icons", "placeholder.png")).append("\">")
|
||||
.append("</div>")
|
||||
|
||||
.append("<div class=\"overview_item_info\">")
|
||||
|
@ -65,8 +65,10 @@ public class StoreExtensionDetailsItem implements ContentItem {
|
||||
contentBuilder.append("Warning: this extension has been marked unstable!\n\n");
|
||||
}
|
||||
|
||||
contentBuilder.append("\n*Screenshot: *").append("\n")
|
||||
.append("--img:").append(gExtensionStore.getRepository().getResourceUrl("store", "extensions", storeExtension.getTitle(), "screenshot.png"));
|
||||
contentBuilder.append("<div>"
|
||||
.append("\n*Screenshot: *").append("\n")
|
||||
.append("--img:").append(gExtensionStore.getRepository().getResourceUrl("store", "extensions", storeExtension.getTitle(), "screenshot.png"))
|
||||
.append("</div>");
|
||||
|
||||
return contentBuilder.toString();
|
||||
}
|
||||
@ -106,7 +108,7 @@ public class StoreExtensionDetailsItem implements ContentItem {
|
||||
line = line.replaceAll("\\*([^*]*)\\*", "<b>$1</b>")
|
||||
.replaceAll("_([^_<>]*)_", "<i>$1</i>")
|
||||
.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?:[^ ]*)",
|
||||
String.format("<a href=\"#\" onClick=\"%s.openUrl("$2")\">$1</a>", id));
|
||||
// .replaceAll("([^\";])(https?:[^ ]*)",
|
||||
|
Loading…
Reference in New Issue
Block a user