diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..1975498 --- /dev/null +++ b/script.js @@ -0,0 +1,24 @@ +var form = document.getElementById("myform") + + +form.addEventListener('submit', function (e) { + e.preventDefault() + + var search = document.getElementById("Search").value + + + var originalName = search.split(' ').join('') + + // alert(originalName) + document.getElementById("result").innerHTML = "" + + fetch("http://api.github.com/users/"+originalName) + .then((result) => result.json()) + .then((data) => { + + console.log(data) + document.getElementById("result").innerHTML=` + + ` + }) + }) \ No newline at end of file diff --git a/text.html b/text.html new file mode 100644 index 0000000..a2f8020 --- /dev/null +++ b/text.html @@ -0,0 +1,34 @@ + + + + + + + + github user finder using github api + + + + +
+

+

+ Github Search User App +

+
+
+ +
+
+ + +
+
+
+
+ + + + \ No newline at end of file