Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
retornam committed Jul 25, 2020
1 parent e6bb9a6 commit 9bf4e52
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.vercel
26 changes: 22 additions & 4 deletions index.html
@@ -1,16 +1,34 @@
<html>
<head>
<title>My IP</title>
<script src="https://code.jquery.com/jquery-2.2.3.js" integrity="sha256-laXWtGydpwqJ8JA+X9x2miwmaiKhn8tVmOVEigRNtP4=" crossorigin="anonymous"></script>
<meta charset="UTF-8">
<meta content="what is my ip, find my ip, show my ip, get my ip">
<meta name="robots" content="noodp">
<meta name="referrer" content="origin">
<title>ip.retornam.com</title>
<script
src="https://code.jquery.com/jquery-3.5.1.js"
integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
crossorigin="anonymous"></script>
<script type="text/javascript" src="./js/bowser.js"></script>
<link rel="stylesheet" type="text/css" href="./style/fonts.css">
<link rel="stylesheet" type="text/css" href="./style/style.css">
<link rel="stylesheet" type="text/css" href="./style/style.css">
</head>
<body>
<div id="outer">
<div id="inner">
</div>
</div>
<h4 class="your-browser">
<div class="browser-info">
<span class="highlight">
<span id="ua"></span>
<br>
<span id="os"></span>
</span>
<br>
</div>
</h4>
<script type="text/javascript" src="./js/main.js" defer></script>
</body
</body>
</html>

1 change: 1 addition & 0 deletions js/bowser.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion js/main.js
Expand Up @@ -25,10 +25,14 @@ How will you test this? */

$(function() {
var result;
$.getJSON("https://httpbin.org/ip?format=json").success( function(data) {
$.getJSON("https://httpbin.org/ip?format=json").done( function(data) {
console.log("Log Result")
result = JSON.stringify(data);
}).then(function(result) {
$('#inner').text(result.origin);
})
const browser = bowser.parse(window.navigator.userAgent);
var os = browser.os.name.concat(" ", browser.os.version);
$("#ua").text(os);
$("#os").text(navigator.userAgent);
})
13 changes: 12 additions & 1 deletion style/style.css
Expand Up @@ -15,7 +15,7 @@
body {
background-color: ;
text-align: center;
color: red,
color: red;
font-family: '90px LeagueGothic';

}
Expand Down Expand Up @@ -48,3 +48,14 @@ body {
color: red;
}


#browser-info {
margin-top: 4px;
}

.your-browser {
text-align: center;
margin-left: 0;
margin-right: 0;
}

0 comments on commit 9bf4e52

Please sign in to comment.