"LCWHA"의 두 판 사이의 차이
North Korea Humanities
| 47번째 줄: | 47번째 줄: | ||
event.preventDefault(); // 폼 제출 방지 | event.preventDefault(); // 폼 제출 방지 | ||
| − | var searchInput = document.getElementById('searchInput').value | + | var searchInput = document.getElementById('searchInput').value; |
| − | |||
| − | |||
var baseURL = "https://dh.aks.ac.kr/~nkh/wiki/index.php"; | var baseURL = "https://dh.aks.ac.kr/~nkh/wiki/index.php"; | ||
var title = "특수:검색"; | var title = "특수:검색"; | ||
var profile = "advanced"; | var profile = "advanced"; | ||
var fulltext = "1"; | var fulltext = "1"; | ||
| + | var additionalKeywords = ["이청원", "디지털", "아카이브"]; // 추가 검색어 배열 | ||
| + | additionalKeywords.push(searchInput); // 사용자 입력 추가 | ||
| + | |||
| + | var advancedSearch = '{"options":{"plain":["' + additionalKeywords.join('","') + '"]},"namespaces":["0"]}'; | ||
// 최종 URL 생성 | // 최종 URL 생성 | ||
| − | var finalURL = baseURL + '?search=' + encodeURIComponent( | + | var finalURL = baseURL + '?search=' + encodeURIComponent(additionalKeywords.join(' ')) + |
'&title=' + encodeURIComponent(title) + | '&title=' + encodeURIComponent(title) + | ||
'&profile=' + encodeURIComponent(profile) + | '&profile=' + encodeURIComponent(profile) + | ||
'&fulltext=' + fulltext + | '&fulltext=' + fulltext + | ||
| − | '&advancedSearch-current= | + | '&advancedSearch-current=' + encodeURIComponent(advancedSearch) + |
'&ns0=1'; // ns0=1 추가 | '&ns0=1'; // ns0=1 추가 | ||
| 67번째 줄: | 69번째 줄: | ||
}; | }; | ||
</script> | </script> | ||
| + | |||
</html> | </html> | ||
2024년 10월 24일 (목) 19:39 판