Libraryless. Click here for Pure Java version (4674L/31K).
1 | static int getSnippetType(String id) { |
2 | if (!isSnippetID(id)) ret 0; |
3 | ret getSnippetType(psI(id)); |
4 | } |
5 | |
6 | static int getSnippetType(long id) { |
7 | ifndef NoResourceLoader |
8 | IResourceLoader rl = vm_getResourceLoader(); |
9 | if (rl != null) |
10 | ret rl.getSnippetType(fsI(id)); |
11 | endifndef |
12 | |
13 | ret getSnippetType_noResourceLoader(id); |
14 | } |
15 | |
16 | static int getSnippetType_noResourceLoader(long id) ctex { |
17 | if (isLocalSnippetID(id)) ret localSnippetType(id); |
18 | if (isGeneralFileServerSnippet(id)) ret snippetType_data(); |
19 | if (isImageServerSnippet(id)) ret snippetType_image(); |
20 | ret parseInt(trim(loadPageSilently(new URL(tb_mainServer() + "/tb-int/getfield.php?id=" + id + "&field=type" + standardCredentials())))); |
21 | } |
Began life as a copy of #1001012
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1004485 |
Snippet name: | getSnippetType (as int) |
Eternal ID of this version: | #1004485/11 |
Text MD5: | cf73c3825c700c0bc45a860b5aa650cd |
Transpilation MD5: | 079d4f32cb4d4543510e4cb6e1baa42f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-10-14 14:28:16 |
Source code size: | 724 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 701 / 780 |
Version history: | 10 change(s) |
Referenced in: | [show references] |