"틀:SemanticGraph"의 두 판 사이의 차이
광주문화예술인문스토리플랫폼
| 2번째 줄: | 2번째 줄: | ||
{{#tag:html| | {{#tag:html| | ||
<div id="semantic-graph-container"> | <div id="semantic-graph-container"> | ||
| − | <iframe id="semantic-graph-iframe" width="100%" height="640px" style="border:0" src="https://app.vaquitalab.com/aistory/story01?server=tcp:encyves.aks.ac.kr&db=gwangju2025&project=gwangju&key={{{key|}}}"></iframe> | + | <iframe id="semantic-graph-iframe" width="100%" height="640px" style="border:0" src="https://app.vaquitalab.com/aistory/story01?server=tcp:encyves.aks.ac.kr&db=gwangju2025&project=gwangju&key={{{key{{!}}|}}}"></iframe> |
<br/> | <br/> | ||
<input type="button" value="전체화면" onclick="location.href='https://app.vaquitalab.com/aistory/story01?server=tcp:encyves.aks.ac.kr&db=gwangju2025&project=gwangju&key={{{key}}}'"> | <input type="button" value="전체화면" onclick="location.href='https://app.vaquitalab.com/aistory/story01?server=tcp:encyves.aks.ac.kr&db=gwangju2025&project=gwangju&key={{{key}}}'"> | ||
| 13번째 줄: | 13번째 줄: | ||
iframe.addEventListener('load', function() { | iframe.addEventListener('load', function() { | ||
try { | try { | ||
| − | + | var iframeDoc = iframe.contentDocument {{!}}{{!}} iframe.contentWindow.document; | |
| − | var iframeDoc = iframe.contentDocument | ||
| − | + | if (iframeDoc.title.includes('404') {{!}}{{!}} | |
| − | if (iframeDoc.title.includes('404') | + | iframeDoc.body.innerHTML.includes('404') {{!}}{{!}} |
| − | iframeDoc.body.innerHTML.includes('404') | ||
iframeDoc.body.innerHTML.length < 100) { | iframeDoc.body.innerHTML.length < 100) { | ||
hideGraphSection(); | hideGraphSection(); | ||
} | } | ||
} catch(e) { | } catch(e) { | ||
| − | |||
fetch(iframe.src, {method: 'HEAD'}) | fetch(iframe.src, {method: 'HEAD'}) | ||
.then(function(response) { | .then(function(response) { | ||
| − | if (!response.ok | + | if (!response.ok {{!}}{{!}} response.status === 404) { |
hideGraphSection(); | hideGraphSection(); | ||
} | } | ||
| 36번째 줄: | 33번째 줄: | ||
}); | }); | ||
| − | |||
iframe.addEventListener('error', function() { | iframe.addEventListener('error', function() { | ||
hideGraphSection(); | hideGraphSection(); | ||
| 42번째 줄: | 38번째 줄: | ||
function hideGraphSection() { | function hideGraphSection() { | ||
| − | |||
var pTag = container.closest('p'); | var pTag = container.closest('p'); | ||
if (pTag) { | if (pTag) { | ||
pTag.style.display = 'none'; | pTag.style.display = 'none'; | ||
| − | |||
var prevElement = pTag.previousElementSibling; | var prevElement = pTag.previousElementSibling; | ||
while (prevElement) { | while (prevElement) { | ||
| 62번째 줄: | 56번째 줄: | ||
}} | }} | ||
</onlyinclude> | </onlyinclude> | ||
| + | |||
2026년 1월 12일 (월) 09:33 판
사용방법
시맨틱 데이터베이스의 특정 노드를 중심으로 하는 네트워크 그래프를 출력하는 틀입니다
{{SemanticGraph | key = }}