mirror of
https://github.com/hexahigh/portfolio.git
synced 2025-12-12 03:25:06 +01:00
test new ip method using webrtc
This commit is contained in:
parent
7dfdc2a357
commit
085fc97437
@ -9,6 +9,7 @@
|
||||
<link rel="icon" type="image/x-icon" href="data/images/logoround.png">
|
||||
<link rel="stylesheet" href="data/style.css">
|
||||
<script src="index.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/joeymalvinni/webrtc-ip/dist/bundle.dev.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
5
index.js
5
index.js
@ -27,7 +27,10 @@ document.querySelector('.current-year').innerText = year;
|
||||
|
||||
//Get user ip to put it in the contact form
|
||||
//Also check if they are using a vpn
|
||||
$.getJSON("https://europe-central2-portfolio-website-374313.cloudfunctions.net/getip", function(data) {
|
||||
//$.getJSON("https://europe-central2-portfolio-website-374313.cloudfunctions.net/getip", function(data) {
|
||||
getIPs().then(data=>{
|
||||
console.log(data.ip)
|
||||
console.log(data.join)
|
||||
var userip = (data.ip);
|
||||
document.getElementById("formip").value = (data.ip);
|
||||
fetch('vpnip.txt')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user