{"id":1686,"date":"2021-08-23T21:42:33","date_gmt":"2021-08-23T21:42:33","guid":{"rendered":"http:\/\/nivana.chasi.com\/?page_id=1686"},"modified":"2023-06-30T20:46:14","modified_gmt":"2023-06-30T20:46:14","slug":"1686-2","status":"publish","type":"page","link":"https:\/\/chasi.com\/?page_id=1686","title":{"rendered":"\u0dc3\u0dd6\u0dad\u0dca\u200d\u0dbb \u0db4\u0dd2\u0da7\u0d9a \u0db0\u0dbb\u0dca\u0db8 \u0daf\u0dda\u0dc1\u0db1\u0dcf"},"content":{"rendered":"\n<p><\/p>\n\n\n\n\u0d85\u0dad\u0dd2\u0db4\u0dd6\u0da2\u0dca\u200d\u0dba \u0d85\u0dbd\u0dc0\u0dca\u0dc0\u0dda \u0d85\u0db1\u0ddd\u0db8\u0daf\u0dc3\u0dca\u0dc3\u0dd3 \u0dc3\u0dca\u0dc0\u0dcf\u0db8\u0dd3\u0db1\u0dca\u0dc0\u0dc4\u0db1\u0dca\u0dc3\u0dda \u0dc0\u0dd2\u0dc3\u0dd2\u0db1\u0dca \u0dc3\u0dd2\u0daf\u0dd4 \u0d9a\u0dbb\u0db1 \u0dbd\u0daf \u0dc3\u0dd6\u0dad\u0dca\u200d\u0dbb \u0db4\u0dd2\u0da7\u0d9a \u0db0\u0dbb\u0dca\u0db8 \u0daf\u0dda\u0dc1\u0db1\u0dcf<br><br>\n<div id=\"frame\"><\/div><br><hr>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<ul class=\"myUL\" id=\"json\/tipitaka.json\"><\/ul>\n<ul class=\"myUL\" id=\"json\/vinaya.json\"><\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"dropdown\">\n\t<button onclick=\"searchButtonClick()\" class=\"dropbtn\">\u0dc3\u0ddc\u0dba\u0db1\u0dca\u0db1 <\/button>\n\t<div id=\"dropdownContent\" class=\"dropdown-content\">\n\t\t<input type=\"text\" placeholder=\"Search...\" id=\"inputId\" onkeyup=\"filterFunction()\">\n\t\t<div id=\"dropdownLinks\"><\/div>\n\t<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<style>\nul, .myUL {\n  list-style-type: none;\n}\n\n.myUL {\n  margin: 0;\n  padding: 10px;\n  \n}\n\n.item {\n  cursor: pointer;\ncolor: black;\n}\n\n.caret {\n  cursor: pointer;\n  -webkit-user-select: none; \/* Safari 3.1+ *\/\n  -moz-user-select: none; \/* Firefox 2+ *\/\n  -ms-user-select: none; \/* IE 10+ *\/\n  user-select: none;\n}\n\n.caret::before {\n  content: \"\\25B6\";\n  font-size:11px;\n  color: black;\n  display: inline-block;\n  margin-right: 6px;\n}\n\n.caret-down::before {\n  -ms-transform: rotate(90deg); \/* IE 9 *\/\n  -webkit-transform: rotate(90deg); \/* Safari *\/'\n  transform: rotate(90deg);  \n}\n\n.dropbtn {\n  background-color: #04AA6D;\n  color: white;\n  padding: 16px;\n  font-size: 16px;\n  border: none;\n  cursor: pointer;\n}\n\n.dropbtn:hover, .dropbtn:focus {\n  background-color: #3e8e41;\n}\n\n#inputId {\n  box-sizing: border-box;\n  font-size: 16px;\n  padding: 14px 20px 12px 45px;\n  border: none;\n  border-bottom: 1px solid #ddd;\n}\n\n#inputId:focus {outline: 3px solid #ddd;}\n\n.dropdown {\n  position: relative;\n  display: inline-block;\n}\n\n.dropdown-content {\n  display: none;\n  position: absolute;\n  background-color: #f6f6f6;\n  min-width: 230px;\n  overflow: auto;\n  border: 1px solid #ddd;\n  z-index: 1;\n}\n\n.dropdown-content a {\n  color: black;\n  padding: 12px 16px;\n  text-decoration: none;\n  display: block;\n}\n\n.dropdown a:hover {background-color: #ddd;}\n\n.nested {display: none;}\n.active {display: block;}\n<\/style>\n\n\n\n<script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.5.1\/jquery.min.js\"><\/script>\n\n<script>\nvar hoverTextColor = \"#c258c4\";\nvar normalTextColor = \"black\";\nvar currentColoredText = null;\n\n$(document).ready(function() {\n\tvar allULList = document.getElementsByClassName(\"myUL\");\n\tvar dropdownLinks = document.getElementById(\"dropdownLinks\");\n\tvar i, myUL;\n\tvar itemId = 0;\n\n\tfor (i = 0; i < allULList.length; i++) {\n\t\tmyUL = allULList[i];\n\t\t$.getJSON(myUL.id, (function(thisi) {\n\t\t\treturn function(folders) {\n\t\t\t\tmyUL = allULList[thisi];\n\t\t\t\t\n\t\t\t\tvar htmlString = \"\";\n\t\t\t\tvar dropdownLinksHTML = \"\";\n\t\t\t\tvar prevDepth = 1;\n\t\t\t\tfor (j in folders) {\n\t\t\t\t\tvar stack = [[folders[j], 1]];\n\t\t\t\t\tfolders[j].visited = true;\n\t\t\t\t\t\n\t\t\t\t\twhile (stack.length > 0) {\n\t\t\t\t\t\tvar s = stack.pop();\n\t\t\t\t\t\tvar f = s[0];\n\t\t\t\t\t\tvar depth = s[1];\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile (prevDepth > depth) {\n\t\t\t\t\t\t\tconsole.log(\"CLOSE\");\n\t\t\t\t\t\t\thtmlString += \"<\/ul><\/li>\";\n\t\t\t\t\t\t\tprevDepth--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tconsole.log(\"NEW LIST \" + f.title + \" @ \" + depth);\n\t\t\t\t\t\thtmlString += \"<li><span class='caret'>\" + f.title + \"<\/span><ul class='nested'>\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Not a folder\n\t\t\t\t\t\tif (f.content[0].videoId != null) {\n\t\t\t\t\t\t\tconsole.log(\"Non-folder \" + f.title);\n\t\t\t\t\t\t\tfor (k in f.content) {\n\t\t\t\t\t\t\t\t\/\/var itemId = i + \"-\" + j + \"-\" + k;\n\t\t\t\t\t\t\t\tvar item = f.content[k];\n\t\t\t\t\t\t\t\tconsole.log(\"...\" + item.title);\n\t\t\t\t\t\t\t\thtmlString += \"<li onclick=\\\"loadVideo('\" + itemId + \"', '\" + item.videoId + \"', '\" + item.startTime + \"', '\" + item.endTime + \"')\\\" color=\\\"black\\\" id=\\\"\" + itemId + \"\\\"><span color=\\\"black\\\" class='item'>\" + item.title + \"<\/li>\";\n\t\t\t\t\t\t\t\tdropdownLinksHTML += \"<a color=\\\"black\\\" onclick=\\\"searchLinkClick('\" + itemId + \"')\\\">\" + item.title + \"<\/a>\";\n\t\t\t\t\t\t\t\titemId++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tconsole.log(\"CLOSE\");\n\t\t\t\t\t\t\thtmlString += \"<\/ul><\/li>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Folder\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfor (k in f.content) {\n\t\t\t\t\t\t\t\tvar item = f.content[f.content.length - 1 - k];\n\t\t\t\t\t\t\t\tif (item.visited == null){\n\t\t\t\t\t\t\t\t\titem.visited = true;\n\t\t\t\t\t\t\t\t\tstack.push([item, depth+1]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprevDepth = depth;\n\t\t\t\t\t}\n\t\t\t\t\thtmlString += \"<\/ul><\/li>\";\n\t\t\t\t}\n\n\t\t\t\tmyUL.innerHTML += htmlString;\n\t\t\t\tdropdownLinks.innerHTML += dropdownLinksHTML;\n\t\t\t};\n\t\t\t}(i)));}\n\t\t\n\t\t\/\/ Caret click\n\t\t$('body').on('click', '.caret', function() {\n\t\t\t$(this).toggleClass('caret-down');\n\t\t\t$(this).siblings('.nested').toggleClass('active');\n\t\t});\n\t\t\/\/ Text hover\n\t\t$('body').on('mouseenter', '.item,.caret', function() {\n\t\tif (currentColoredText != null)\n\t\t\t$(currentColoredText).css('color', normalTextColor);\n\t\t$(this).css('color', hoverTextColor);\n\t\tcurrentColoredText = this;\n\t\t});\n\t\t$('body').on('mouseleave', '.item,.caret', function() {\n\t\t\t$(this).css('color', normalTextColor);\n\t\t\tcurrentColoredText = null;\n\t\t});\n\t\t\/\/ Enter key on input -> go to first match\n\t\t$('#inputId').on('keyup', function (e) {\n\t\t\tif (e.key === 'Enter' || e.keyCode === 13)\n\t\t\t\tdocument.querySelector('#dropdownLinks a:not(.nested)').click();\n\t\t});\n\t}\n);\n\n\/\/ Search button\nfunction searchButtonClick() {\n  document.getElementById(\"dropdownContent\").classList.toggle(\"active\");\n}\n\n\/\/ Searching dropdown part\nfunction filterFunction() {\n\tvar filter = document.getElementById(\"inputId\").value.toUpperCase();\n\tvar a = document.getElementById(\"dropdownContent\").getElementsByTagName(\"a\");\n\t\n\t\/\/ Loop through links\n\tvar i;\n\tfor (i = 0; i < a.length; i++) {\n\t\ttxtValue = a[i].textContent || a[i].innerText;\n\t\t\n\t\t\/\/ Found text\n\t\tif (txtValue.toUpperCase().indexOf(filter) > -1) {\n\t\t\ta[i].style.display = \"\";\n\t\t\ta[i].classList.remove('nested');\n\t\t}\t\t\t\n\t\t\/\/ Not found\n\t\telse {\n\t\t\ta[i].style.display = \"none\";\n\t\t\ta[i].classList.add('nested');\n\t\t}\n\t}\n}\nfunction searchLinkClick(idName) {\n\t\/\/ Reset dropdown\n\tsearchButtonClick();\n\tdocument.getElementById('inputId').value = \"\";\n\tfilterFunction();\n\t\n\t\/\/ Open folders to item\n\tvar item = document.getElementById(idName);\n\tvar element = item;\n\twhile(!element.classList.contains('myUL')) {\n\t\telement = element.parentNode;\n\t\tif (element.classList.contains('nested')) {\n\t\t\telement.previousSibling.classList.add('caret-down');\n\t\t\telement.classList.add('active');\n\t\t}\n\t}\n\t\n\t\/\/ Animate item\n\t$(document).ready(function() {\n\t\tif (currentColoredText != null)\n\t\t\t$(currentColoredText).css('color', normalTextColor);\n\t\t$(item.childNodes[0]).css('color', hoverTextColor);\n\t\tcurrentColoredText = item.childNodes[0];\n\t});\n\t\n\t\/\/ Scroll to item\n\titem.scrollIntoView({\n            block: 'center'\n        });\n}\n\n\/\/ Video part\nvar frame = document.getElementById(\"frame\"); \nvar currentVideoItem = null;\nfunction loadVideo(itemId, videoId, startTime, endTime) {\n\tstartTimeList = startTime.split(\":\");\n\tendTimeList = endTime.split(\":\");\n\t\n\tstartTimeSec = parseInt(startTimeList[0])*3600 + parseInt(startTimeList[1])*60 + parseInt(startTimeList[2]);\n\tendTimeSec = parseInt(endTimeList[0])*3600 + parseInt(endTimeList[1])*60 + parseInt(endTimeList[2]);\n\t\n\tif (startTimeSec == 0) startTimeSec = 1;\n\t\n\tsrcVal = \"https:\/\/www.youtube.com\/embed\/\" + videoId + \"\/?autoplay=1&start=\" + startTimeSec + \"&end=\" + endTimeSec;\n\t\n\tframe.innerHTML = \"<iframe id='videoPlayer' width='955' height='537' src='\" + srcVal + \"' frameborder='0' allow=\\\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\\\" allowfullscreen><\/iframe>\";\n\t\n\t\/\/ Bold playing item\n\tif (currentVideoItem != null)\n\t\tcurrentVideoItem.style.fontWeight = 'normal';\n\tcurrentVideoItem = document.getElementById(itemId);\n\tcurrentVideoItem.style.fontWeight = 'bold';\n\t\n\t\/\/ Scroll to video\n\tframe.scrollIntoView();\n}\n<\/script>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0d85\u0dad\u0dd2\u0db4\u0dd6\u0da2\u0dca\u200d\u0dba \u0d85\u0dbd\u0dc0\u0dca\u0dc0\u0dda \u0d85\u0db1\u0ddd\u0db8\u0daf\u0dc3\u0dca\u0dc3\u0dd3 \u0dc3\u0dca\u0dc0\u0dcf\u0db8\u0dd3\u0db1\u0dca\u0dc0\u0dc4\u0db1\u0dca\u0dc3\u0dda \u0dc0\u0dd2\u0dc3\u0dd2\u0db1\u0dca \u0dc3\u0dd2\u0daf\u0dd4 \u0d9a\u0dbb\u0db1 \u0dbd\u0daf \u0dc3\u0dd6\u0dad\u0dca\u200d\u0dbb \u0db4\u0dd2\u0da7\u0d9a \u0db0\u0dbb\u0dca\u0db8 \u0daf\u0dda\u0dc1\u0db1\u0dcf \u0dc3\u0ddc\u0dba\u0db1\u0dca\u0db1<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1686","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/chasi.com\/index.php?rest_route=\/wp\/v2\/pages\/1686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chasi.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/chasi.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/chasi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chasi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1686"}],"version-history":[{"count":175,"href":"https:\/\/chasi.com\/index.php?rest_route=\/wp\/v2\/pages\/1686\/revisions"}],"predecessor-version":[{"id":2424,"href":"https:\/\/chasi.com\/index.php?rest_route=\/wp\/v2\/pages\/1686\/revisions\/2424"}],"wp:attachment":[{"href":"https:\/\/chasi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}