sS getSnippetTitle(S id) { if (id == null) null; if (!isSnippetID(id)) ret "?"; ifndef NoResourceLoader IResourceLoader rl = vm_getResourceLoader(); if (rl != null) ret rl.getSnippetTitle(id); endifndef ret getSnippetTitle_noResourceLoader(id); } sS getSnippetTitle_noResourceLoader(S id) ctex { if (isLocalSnippetID(id)) ret localSnippetTitle(id); long parsedID = parseSnippetID(id); S url; if (isImageServerSnippet(parsedID)) url = imageServerURL() + "title/" + parsedID + muricaCredentialsQuery(); else if (isGeneralFileServerSnippet(parsedID)) url = "http://butter.botcompany.de:8080/files/name/" + parsedID; else url = tb_mainServer() + "/tb-int/getfield.php?id=" + parsedID + "&field=title" + standardCredentials_noCookies(); S title = trim(loadPageSilently(url)); if (title != null) pcall-short { saveTextFileIfChanged(snippetTitle_cacheFile(id), title); } return or(title, "?"); } static String getSnippetTitle(long id) { ret getSnippetTitle(fsI(id)); }