obsidianUIMode |
created |
modified |
tags |
aliases |
source |
2021-10-18 00:17:00 -0700 |
2021-11-07 20:45:41 |
|
|
<%*
const ID=0, TITLE=1, URL=2;
let aLinks = [
[ "google-translate", "🌳Google翻譯", "https://translate.google.com/?sl=en&tl=zh-TW&op=translate" ],
[ "google-sheet", "⚡多語言翻譯", "https://docs.google.com/spreadsheets/d/1_QTQHGxgqTS7ilI6B_GmqwUza92esAyKHJcUlBja03M/edit"],
[ "cdict", "🀄中文辭典", "https://dict.concised.moe.edu.tw/search.jsp?md=1" ],
[ "cns11643", "🅰️中文交換碼", "https://www.cns11643.gov.tw/searchQ.jsp?ID=0" ],
[ "terms", "📚學術名詞暨辭書", "https://terms.naer.edu.tw/" ],
[ "random", "🎲亂數假文產生器", "http://www.richyli.com/tool/loremipsum/" ],
[ "emoji", "😄Emoji詞典", "https://www.emojiall.com/zh-hant" ],
[ "table-converter", "📈建立表格", "https://tableconverter.com" ],
[ "table-to-markdown", "📈表格轉換", "https://markdown-convert.com/" ],
[ "fontawesome", "🙆♂️FontAwesome", "https://fontawesome.com/v6.0/icons" ],
];
let aColors = [ "blue" ];
const NL = String.fromCharCode(13) + String.fromCharCode(10);
const BQ1 = String.fromCharCode(96);
const BQ3 = BQ1 + BQ1 + BQ1;
let buttons = "", inlineButtons = "", iframeLinks = "", iframes = "";
for (let i=0; i < aLinks.length; i++) {
let aLink = aLinks[i];
buttons += ${BQ3}button name ${aLink[TITLE]} type link action ${aLink[URL]} color ${aColors[0]} ${BQ3} ^button-browser-${aLink[ID]}
;
inlineButtons += `${BQ1}button-browser-${aLink[ID]}${BQ1}` + NL;
iframeLinks += `- [[#^${aLink[ID]}|${aLink[TITLE]}]]` + NL;
iframes += `
%%### ${aLink[TITLE]}%%
%%[[#內嵌|⬆️]]%%
${BQ3}ad-info
title: ${aLink[TITLE]} ^${aLink[ID]}
collapse: close
<iframe width="850" height="515" src="${aLink[URL]}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
${BQ3}
^${aLink[ID]}
`;
}
%>
<% "%%" + NL + buttons + "%%" %>
<% inlineButtons %>
<% iframeLinks %>
<% iframes %>