-
Notifications
You must be signed in to change notification settings - Fork 0
/
ts-debugger.js
36 lines (32 loc) · 965 Bytes
/
ts-debugger.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function loadIframe(){
var iframes = document.getElementsByTagName("iframe");
var div = document.getElementsByClassName("iframeContent");
for(var i=0; i<iframes.length; i++){
var iframe = iframes[i];
/*var textContent = iframe.textContent;
var wrapper = document.createElement('div');
wrapper.innerHTML = textContent;
iframeContentDocument = iframe.contentWindow.document;
iframeContentDocument.write(wrapper.innerHTML);
iframe.textContent = "";
*/
var doc = iframe.contentWindow.document;
doc.open();
doc.write(div[i].innerHTML);
doc.close();
}
}
function init(){
var coll = document.getElementsByClassName("collapsible");
for (var i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.display === "block") {
content.style.display = "none";
} else {
content.style.display = "block";
}
});
}
}