// dip service
var dip;
function get_elements() {
  dip = document.getElementById("dip");
}

function get_ip() {
  let a = fetch("https://ip.paulbsd.com/json");
  a.then((resp) => {
    resp.json().then(js => {
      dip.innerHTML = js["ip"];
      dip.href = `https://ip.paulbsd.com/${js["ip"]}`;
    });
  });
}

get_elements();
get_ip();