forked from PalashTanejaPro/BlindHelper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scan.html
44 lines (37 loc) · 1005 Bytes
/
scan.html
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
37
38
39
40
41
42
43
44
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
var sourceCode = document.getElementsByTagName('html')[0].innerHTML;
var sideBarContent = "";
var navigationContent = "";
var headers = "";
var paragraphContent = "";
var lists = "";
var tableContent = "";
function addToContent(content, tag) {
var count = document.getElementsByTagName(tag).length;
for (var i = 0; i < count; i++) {
content += document.getElementsByTagName(tag)[i].innerHTML + " ";
}
console.log(content);
}
/*
* SIDEBAR CONTENT
*/
addToContent(sideBarContent, "aside");
// (?) body sourceCode.search(/>*<\/body/gm);
/*
* BODY CONTENT
*/
addToContent(headers, "h");
addToContent(paragraphContent, "p");
addToContent(lists, "li");
addToContent(tableContent, "table");
// (?) span sourceCode.search(/>*<\/span>/gm);
/*
* NAVIGATION CONTENT
*/
// a
addToContent(navigationContent, "a");
});
</script>