Клик API

Клик API

Seogle

Главная О нас | Помощь

▇▇▇▇▇▇▇▇▇▇▇▇▇▇◤

API▇▇▇▇▇▇▇▇▇▇▇◤

▇▇▇▇▇▇▇▇▇▇▇◤

▇▇▇▇▇▇▇▇▇◤


Вставьте этот код на свой сайт, чтобы иметь свой сокращатор ссылок по типу клика!

<!DOCTYPE html>

<html lang="en">


<head>

 <meta charset="UTF-8">

 <title>Seogle Клик</title>

 <!-- предостережет от лишнего GET запроса на адрес /favicon.ico -->

 <link rel="icon" href="data:;base64,iVBORw0KGgo=">

<style>

    body {

      font-family: Times New Roman, sans-serif;

      background-color: #f0f0f0;

      color: #333;

      margin: 0;

      padding: 0;

    }

    header {

      background-color: #0066cc;

      color: white;

      padding: 20px;

      text-align: center;

    }

    nav {

      background-color: #333;

      color: white;

      padding: 10px;

      text-align: center;

    }

    nav a {

      color: white;

      margin: 0 10px;

      text-decoration: none;

    }

    main {

      padding: 20px;

    }

    footer {

      background-color: #0066cc;

      color: white;

      text-align: center;

      padding: 10px;

      position: fixed;

      width: 100%;

      bottom: 0;

    }

    input {

      padding: 10px 20px;

      background-color: #0066cc;

      color: white;

      border: Green;

      cursor: Green;

    }

    ul {

      display: flex;

      justify-content: space-around;

      padding: 0;

      list-style-type: none;

      color: #0066cc;

}

</style>

</head>


<body>

 <header>

    <h1>Клик</h1>

  </header>

 <nav>

    <a href="">Главная</a>

    <a href="https://t.me/seogleoffical">О нас</a>

  </nav>

 <form action="javascript:shorten()">

  <label for="url">Введите URL:</label><br>

<input id="url" name="url" type="text"><br>

<input type="submit" value="СуперКлик"><a href="https://clck.ru">Клик!</a>

 </form>

 <p id="shortened"></p>

<footer>

<ul>

  <li><a href="https://clck.ru">Яндекс</a></li>

  <li><a href="https://vk.com/cc">VK</a></li>

</ul>

<p>© SEOGLE: 2024 - 2026</p>

</footer>

</body>


<script>

 function shorten() {

  const link = document.getElementById("url").value

  fetch("/shorten", {

   method: 'POST',

   headers: {

    'Content-Type': 'application/json'

   },

   body: link

  })

  .then(response => response.json())

  .then(data => {

   const url = data.url

   document.getElementById("shortened").innerHTML = `<a href=${url}>${url}</a>`

  })

  .catch(error => {

   document.getElementById("shortened").innerHTML = `<a href="https://clck.ru/3Qu8SJ">https://clck.ru/3Qu8SJ</a>`

  })

 }

</script>


</html>

Каталог ЛУЧШИХ и КАЧЕСТВЕННЫХ видео

© SEOGLE: 2024 - 2026

Report Page