Feathertail

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Feathertail » Тестовый форум » Скрипты


Скрипты

Сообщений 1 страница 7 из 7

1

Скрипты

Отредактировано Feather (2023-08-23 10:15:11)

0

2

[html]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
  body {
    font-family: Arial, sans-serif;
  }
  label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
  }
  input[type="text"] {
    width: 90%;
    padding: 5px;
    border-radius: 3px;
    background: #9183648c!important;
    background-color: rgba(27, 14, 4, 0.1) !important;
    border: 3px double rgba(42, 14, 8, 0.28) !important;
  }
  button {
    padding: 5px 10px !important;
    margin: 10px;
    background: radial-gradient(ellipse at center, #2e1408 14%,#200702 100%);
    border-left: solid 1px #2F2C25;
    border-radius: 3px;
    color: #806E48 !important;
    box-shadow: inset 0px 0px 6px #855d42c7, 0px 3px 5px rgba(102, 48, 27, 0.553);
    border: none;
    cursor: pointer;
    width: 100px;
    height: 40px;
  }
  button:hover {
    text-shadow: rgba(100%, 80%, 0%, 0.5) 1px 0 10px;
  }
  #output {
    margin-top: 20px;
    border: 1px solid #ccc;
    padding: 10px;
    white-space: pre;
  }
  .autolz {
   width: 80%;
   border: 1px solid #a9a685a8;
   border-radius: 5px;
   padding: 15px;
   background-color: rgba(133, 113, 80, 0.4);
   text-shadow: #a9a685a8 1px 1px 0px;
   font-size: 12px;
   box-shadow: 0 0px 3px 0px rgba(53, 47, 25, 1), 0px 0px 12px #543c24 inset !important;
   display: grid;
   grid-template-columns: 1fr 1fr;
   justify-content: space-arround;
   gap: 5px;
   grid-template-areas:
      "topic2 resul"
      "topic finishedResult"
      "race2 finishedResult"
      "race finishedResult"
      "age2 copyButton"
      "age copyButton"
      "fullname2 copyButton"
      "fullname resul2"
      "appeal2 resul2"
      "appeal finishedResult2"
      "yourtitle2 finishedResult2"
      "yourtitle finishedResult2"
      "work2 copyButton2"
      "work copyButton2"
      "insertButton copyButton2";
}

::-webkit-input-placeholder {
  color: rgba(0%, 0%, 0%, 0.4);
}
:-moz-placeholder {
  color: rgba(0%, 0%, 0%, 0.4);
  opacity: 1;
}
::-moz-placeholder {
  color: rgba(0%, 0%, 0%, 0.4);
  opacity: 1;
}
:-ms-input-placeholder {
  color: rgba(0%, 0%, 0%, 0.4);
}

#topicLink2 { grid-area: topic2; }
  #topicLink { grid-area: topic; }
  #race2 { grid-area: race2; }
  #race { grid-area: race; }
  #age2 { grid-area: age2; }
  #age { grid-area: age; }
  #fullname2 {
     grid-area: fullname2;
     margin-top: 10px;
}
  #fullname { grid-area: fullname; }
  #appeal2 { grid-area: appeal2; }
  #appeal { grid-area: appeal; }
  #yourtitle2 { grid-area: yourtitle2; }
  #yourtitle { grid-area: yourtitle; }
  #insertButton { grid-area: insertButton; }
  #resul {
     grid-area: resul;
     margin-bottom: 0;
     align-self: start;
}
  #finishedResult {
     grid-area: finishedResult;
     align-items: start;
}
  #resul2 {
     grid-area: resul2;
     margin-bottom: 0;
     align-self: end;
}
  #finishedResult2 {
     grid-area: finishedResult2;
     align-self: start;
}
  #copyButton { grid-area: copyButton; }
  #copyButton2 { grid-area: copyButton2; }
  #work2 { grid-area: work2}
  #work { grid-area: work; }

.editable-content {
  border: 1px solid #ccc;
  padding: 10px;
  white-space: pre;
  width: 300px;
  height: 65px;
  overflow: auto;
  background-color: rgba(27, 14, 4, 0.1);
  border: 3px double rgba(42, 14, 8, 0.28);
  border-radius: 3px;
}

</style>
</head>
<body>
<div class="autolz">
  <label for="topicLink2">Ссылка на тему:</label>
  <input type="text" id="topicLink" placeholder="Ссылка на тему">
  <label for="race2">Раса:</label>
  <input type="text" id="race" placeholder="Ваша раса">
  <label for="age2">Возраст:</label>
  <input type="text" id="age" placeholder="Ваш возраст">
  <label for="fullname2" id="fullname2">Полное имя аристократов:</label>
  <input type="text" id="fullname" placeholder="Полное имя">
  <label for="appeal2">Обращение:</label>
  <input type="text" id="appeal" placeholder="Как к вам обращаются?">
  <label for="yourtitle2">Титул:</label>
  <input type="text" id="yourtitle" placeholder="Ваш титул">
  <label for="work2">Род деятельности:</label>
  <input type="text" id="work" placeholder="Род деятельности">
  <button id="insertButton">Вставить</button>
  <label for="finishedResult" id="resul">Первое ЛЗ:</label>
  <div id="finishedResult" class="editable-content" rows="4" cols="40"></div>
  <label for="finishedResult2" id="resul2">Второе ЛЗ:</label>
  <div id="finishedResult2" class="editable-content" rows="4" cols="40"></div>

  <button id="copyButton">Копировать</button>
  <button id="copyButton2">Копировать</button>
</div>
<script async>
  function iconRedir(element) {
    console.log("Перенаправление...");
  }

  document.getElementById("insertButton").addEventListener("click", function() {
    const topicLink = document.getElementById("topicLink").value;
    const topicId = topicLink.match(/id=(\d+)/)[1];
    const race = document.getElementById("race").value;
    const age = document.getElementById("age").value;
    const fullname = document.getElementById("fullname").value;
    const appeal = document.getElementById("appeal").value;
    const yourtitle = document.getElementById("yourtitle").value;

    // Заменяем значения в шаблоне и формируем результат
    const insertedCode = `<a href="#tid=${topicId}"></a><span class="MyredirICon" onclick="iconRedir(this)">${race}, ${age}</span><br><div id='fullname'>${fullname}</div><u>${appeal}</u> ${yourtitle}.`;
 
    document.getElementById("finishedResult").textContent = insertedCode;

    // Извлекаем URL до символа решетки
    const topicUrl = topicLink.split('#')[0];
    const linkCode = `<a href="${topicUrl}">Анкета</a>`;
    document.getElementById("finishedResult2").textContent = linkCode;
  });

  document.getElementById("copyButton").addEventListener("click", function() {
    const finishedResult = document.getElementById("finishedResult");
    const range = document.createRange();
    range.selectNode(finishedResult);
    window.getSelection().removeAllRanges();
    window.getSelection().addRange(range);
    document.execCommand("copy");
    window.getSelection().removeAllRanges();
  });

  document.getElementById("copyButton2").addEventListener("click", function() {
    const finishedResult2 = document.getElementById("finishedResult2");
    const range = document.createRange();
    range.selectNode(finishedResult2);
    window.getSelection().removeAllRanges();
    window.getSelection().addRange(range);
    document.execCommand("copy");
    window.getSelection().removeAllRanges();
  });
</script>

</body>
</html>

[/html]

0

3

Покер на костях

1. Администрирование → Формы → Форма ответа

Код
Код:
<!--Покер на костях-->
<script type="text/javascript">
function getRandomNumber(min, max) {
  return Math.floor(Math.random() * (max - min + 1)) + min;
}

function rollDice() {
  const dice = [];
  for (let i = 0; i < 5; i++) {
    dice.push(getRandomNumber(1, 6));
  }
  return dice; // Вернуть массив кубиков
}

function calculateResult(dice) {
  const counts = Array(6).fill(0);
  dice.forEach(number => {
    counts[number - 1]++;
  });

  let result = "Результат: ";
  if (counts.includes(5)) {
    result += "Покер";
  } else if (counts.includes(4)) {
    result += "Каре";
  } else if (counts.includes(3) && counts.includes(2)) {
    result += "Фулл хаус";
  } else if (counts.includes(3)) {
    result += "Тройка";
  } else if (counts.filter(count => count === 2).length === 2) {
    result += "Две пары";
  } else if (counts.includes(2)) {
    result += "Пара";
  } else {
    result += "Наивысшее очко";
  }

  return result;
}

function playPoker() {
  console.log("Игра начинается!");

  const dice = rollDice();
  console.log("Выпавшие числа на костях:", dice);

  const result = calculateResult(dice);

  const finalResult = `Выпавшие числа на костях: ${dice.join(", ")}\n${result}`;

  $("#main-reply").val(finalResult);
  document.querySelector('.ajax-post').click();
}

$(document).ready(function() {
  $("#play-button").click(function() {
    playPoker();
  });
});

document.addEventListener("DOMContentLoaded", function() {
  if (form = document.getElementById("form-buttons")) {
    var buttonCell = form.getElementsByTagName("tr")[0].insertCell(20);
    buttonCell.id = "button-poker";
    buttonCell.title = "Кубики";
    buttonCell.innerHTML = '<img onclick="playPoker();" src="/i/blank.gif">';
  }
});
</script>
<!--Конец Покера на костях-->

2. Администрирование → Свой стиль → Структура style.css

CSS
Код:
#button-poker {
background-image:url(https://forumupload.ru/uploads/001b/b2/f7/8/631371.png);
}

Функционал: добавляет в форму ответа кнопку, по нажатию которой выпадает 5 случайных кубиков и определяется комбинация, после чего автоматически вставляет результат в форму ответа и жмёт кнопку отправки.

Примечание: на тестовом сайте работает

0

4

[html]
<style>
          body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
        }
          h1 {
            text-align: center;
            font-family: Moyenage;
            font-size: 24px !important;
            line-height: 4;
       }
        .container {
            max-width: 550px;
            margin: 0 auto;
            padding: 20px;
            background-color: rgba(133, 113, 80, 0.4);
            text-shadow: #a9a685a8 1px 1px 0px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        }
        .form-group {
            margin-bottom: 20px;
        }
        label {
            display: block;
            font-weight: bold;
            margin-bottom: 5px;
        }
        input[type="text"], textarea {
            width: 96%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 3px;
            background-color: rgba(27, 14, 4, 0.1) !important;
            border: 3px double rgba(42, 14, 8, 0.28) !important;
            padding: 10px;
        }
        textarea {
            height: 270px;
            width: 100% !important;
            box-sizing: border-box;
            resize: vertical;
            border-radius: 5px;
            border: 3px double rgba(42, 14, 8, 0.28) !important;
            background-color: rgba(27, 14, 4, 0.1) !important;
        }
        button {
            padding: 5px 10px !important;
            margin: 10px;
            background: radial-gradient(ellipse at center, #2e1408 14%,#200702 100%);
            border-left: solid 1px #2F2C25;
            border-radius: 3px;
            color: #806E48 !important;
            box-shadow: inset 0px 0px 6px #855d42c7, 0px 3px 5px rgba(102, 48, 27, 0.553);
            border: none;
            cursor: pointer;
            width: 100px;
            height: 40px;
        }
        button:hover {
            text-shadow: rgba(100%, 80%, 0%, 0.5) 1px 0 10px;
  }
       ::-webkit-input-placeholder {
             color: rgba(0%, 0%, 0%, 0.4);
             padding: 5px !important;
}
       ::-moz-placeholder {
            color: rgba(0%, 0%, 0%, 0.4);
            opacity: 1;
            padding: 5px !important;
}
       ::-moz-placeholder {
            color: rgba(0%, 0%, 0%, 0.4);
            opacity: 1;
            padding: 5px !important;
}
       ::-ms-input-placeholder {
            color: rgba(0%, 0%, 0%, 0.4);
            padding: 5px !important;
}
       #reputation, #generalInfo, #skills, #additionalInfo{
             background-color: rgba(27, 14, 4, 0.1) !important;
             border-radius: 3px;
             box-shadow: none !important;
}
       #endResult {
             border: 1px solid #ccc;
             padding: 10px;
             white-space: pre;
             width: 96%;
             height: 65px;
             overflow: auto;
             background-color: rgba(27, 14, 4, 0.1);
             border: 3px double rgba(42, 14, 8, 0.28);
             border-radius: 3px;
}
</style>
<div class="container">
        <h1>Форма анкеты</h1>
        <form>
            <div class="form-group">
                <label for="imageLink">1. Ссылка на изображение</label>
                <input type="text" id="imageLink" name="imageLink" required placeholder="Введите ссылку">
            </div>
            <div class="form-group">
                <label for="fullName">2. Имя и Фамилия</label>
                <input type="text" id="fullName" name="fullName" required placeholder="Ваше имя и фамилия">
            </div>
            <div class="form-group">
                <label for="nickname">3. Прозвище (по желанию)</label>
                <input type="text" id="nickname" name="nickname" placeholder="Укажите прозвище (если есть)">
            </div>
            <div class="form-group">
                <label for="raceAge">4. Раса, возраст</label>
                <input type="text" id="raceAge" name="raceAge" required placeholder="Ваша раса и возраст">
            </div>
            <div class="form-group">
                <label for="occupation">5. Род деятельности</label>
                <input type="text" id="occupation" name="occupation" required placeholder="Работа/учеба/иная деятельность">
            </div>
            <div class="form-group">
                <label for="residence">6. Место проживания</label>
                <input type="text" id="residence" name="residence" required placeholder="Укажите где вы живёте">
            </div>
            <div class="form-group">
                <label for="reputation">7. Репутация</label>
                <textarea id="reputation" name="reputation" required placeholder="Краткое описание того, что знают о вашем герое окружающие персонажи (не игроки), его известность, общее мнение о его достоинствах и недостатках и пр. Администрация может редактировать этот пункт в зависимости от логики мира и результатов игры."></textarea>
            </div>
            <div class="form-group">
                <label for="generalInfo">8. Общие сведения</label>
                <textarea id="generalInfo" name="generalInfo" required placeholder="Упрощенный прием!
Мы выступаем за лаконичность и поддерживаем развитие персонажа уже в игре! Основное полотно может быть кратким и изложено в той форме, какова вам предпочтительна:

- 5/10/n фактов о герое;

- хронология;

- свободный текст;

- в виде поста;

- отдельно характер и отдельно биография;

- и пр."></textarea>
            </div>
            <div class="form-group">
                <label for="skills">9. Навыки и способности</label>
                <textarea id="skills" name="skills" required placeholder="Сюда пишутся все умственные, физические и чародейские умения персонажа.

При заполнении владения тем или иным оружием или Сферой чародейства ориентируйтесь на сроки обучения Сферам для выбранной расы: и первое, и второе требует примерно одинаковых затрат по времени и они не могут учиться параллельно на должном уровне.

Для чародеев: не забудьте указать свой Почерк чародея.

Обучение языкам же идет параллельно и на них нет четких требований по времени. Большинство персонажей по умолчанию знают всеобщий и родной (какой-то из языков людей, эльфов и т.п.), дополнительные языки свободно дописывайте на свое усмотрение."></textarea>
            </div>
            <div class="form-group">
                <label for="additionalInfo">10. Дополнительная информация</label>
                <textarea id="additionalInfo" name="additionalInfo" placeholder="• Планы и пожелания на игру: писать тут.

• Тип приема: обсуждение через ЛС или в теме анкеты.

• Связь с вами: установлен код скрытого текста. Обязательно для персонажей на ключевых ролях."></textarea>
            </div>
            <button id="paste">Вставить</button>
            <div class="form-group">
                <br><label for="endResult">Итог:</label>
                <br><div id="endResult" name="resultend"></div>
            </div>
            <button id="copy">Скопировать</button>
   </form>
</div>

<script>

function iconRedir(element) {
console.log("Перенаправление...");
}

document.getElementById("paste").addEventListener("click", function(event) {
    event.preventDefault();

    const imageLink = document.getElementById("imageLink").value;
    const fullName = document.getElementById("fullName").value;
    const nickname = document.getElementById("nickname").value;
    const raceAge = document.getElementById("raceAge").value;
    const occupation = document.getElementById("occupation").value;
    const residence = document.getElementById("residence").value;
    const reputation = document.getElementById("reputation").value;
    const generalInfo = document.getElementById("generalInfo").value;
    const skills = document.getElementById("skills").value;
    const additionalInfo = document.getElementById("additionalInfo").value;

    const insertedCode = `
\[mark\]Анкета\[/mark\]

\[h3\]\[url=${imageLink}]\[b\]АНКЕТА\[/b\]\[/url\]\[/h3\]

\[align=center\]\[img\]${imageLink}\[/img\]
\[size=10\]${fullName}\[/size\]\[/align\]

\[rulka0\]${fullName}
\[rulka01\]${nickname}\[/rulka01\]\[/rulka0\]\[align=center\]${raceAge}\[/align\]

\[table layout=fixed width=100%\]
\[tr\]
\[td\]\[rulka\]РОД ДЕЯТЕЛЬНОСТИ\[/rulka\]\[/td\]
\[td width=8px\]\[/td\]
\[td\]\[rulka\]МЕСТО ПРОЖИВАНИЯ\[/rulka\]\[/td\]
\[/tr\]
\[tr\]
\[td\]${occupation}\[/td\]\[td width=8px\]\[/td\]\[td\]${residence}\[/td\]
\[/tr\]
\[/table\]

\[rulka\]РЕПУТАЦИЯ\[/rulka\]
${reputation}

\[rulka\]ОБЩИЕ СВЕДЕНИЯ\[/rulka\]
${generalInfo}

\[rulka\]НАВЫКИ И СПОСОБНОСТИ\[/rulka\]
${skills}

\[rulka\]ДОПОЛНИТЕЛЬНАЯ ИНФОРМАЦИЯ\[/rulka\]
${additionalInfo}
\[b\]• Планы и пожелания на игру:\[/b\] писать тут.

\[b\]• Тип приема:\[/b\] обсуждение через ЛС или в теме анкеты.

\[hide=9999\]\[b\]• Связь с вами:\[/b\] установлен код скрытого текста. Обязательно для персонажей на ключевых ролях.\[/hide\]`;

    document.getElementById("endResult").textContent = insertedCode;
});

document.getElementById("copy").addEventListener("click", function(event) {
            event.preventDefault();

            // Select the text content of the "endResult" div
            const endResult = document.getElementById("endResult");
            const range = document.createRange();
            range.selectNode(endResult);
            window.getSelection().addRange(range);

            // Copy the selected text to the clipboard
            document.execCommand("copy");

            // Deselect the text
            window.getSelection().removeAllRanges();

            // Optionally, provide user feedback (e.g., an alert)
            alert("Содержимое скопировано в буфер обмена.");
        });
</script>
[/html]

0

5

[mob]Генератор ЛЗ[/mob]https://forumstatic.ru/files/001b/d9/4a/98214.png
[html]

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
  body {
    font-family: Arial, sans-serif;
  }
  label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
  }
  input[type="text"] {
    width: 90%;
    padding: 5px;
    border-radius: 3px;
    background: #9183648c!important;
    background-color: rgba(27, 14, 4, 0.1) !important;
    border: 3px double rgba(42, 14, 8, 0.28) !important;
  }
  button {
    padding: 5px 10px !important;
    margin: 30px;
    background: radial-gradient(ellipse at center, #2e1408 14%,#200702 100%);
    border-left: solid 1px #2F2C25;
    border-radius: 3px;
    color: #806E48 !important;
    box-shadow: inset 0px 0px 6px #855d42c7, 0px 3px 5px rgba(102, 48, 27, 0.553);
    border: none;
    cursor: pointer;
    width: 100px;
    height: 40px;
  }
  button:hover {
    text-shadow: rgba(100%, 80%, 0%, 0.5) 1px 0 10px;
  }
  #output {
    margin-top: 20px;
    border: 1px solid #ccc;
    padding: 10px;
    white-space: pre;
  }
  .autolz {
   width: 80%;
   border: 1px solid #a9a685a8;
   border-radius: 10px;
   padding: 30px;
   background-color: rgba(133, 113, 80, 0.4);
   text-shadow: #a9a685a8 1px 1px 0px;
   font-size: 12px;
   box-shadow: 0 0px 3px 0px rgba(53, 47, 25, 1), 0px 0px 12px #543c24 inset !important;
   display: grid;
   grid-template-columns: 1fr 1fr;
   justify-content: space-arround;
   gap: 5px;
   grid-template-areas:
      "topic2 resul"
      "topic finishedResult"
      "race2 finishedResult"
      "race finishedResult"
      "age2 copyButton"
      "age copyButton"
      "fullname2 copyButton"
      "fullname resul2"
      "appeal2 resul2"
      "appeal finishedResult2"
      "yourtitle2 finishedResult2"
      "yourtitle finishedResult2"
      "work2 copyButton2"
      "work copyButton2"
      "insertButton copyButton2";
}

::-webkit-input-placeholder {
  color: rgba(0%, 0%, 0%, 0.4);
}
:-moz-placeholder {
  color: rgba(0%, 0%, 0%, 0.4);
  opacity: 1;
}
::-moz-placeholder {
  color: rgba(0%, 0%, 0%, 0.4);
  opacity: 1;
}
:-ms-input-placeholder {
  color: rgba(0%, 0%, 0%, 0.4);
}

#topicLink2 { grid-area: topic2; }
  #topicLink { grid-area: topic; }
  #race2 { grid-area: race2; }
  #race { grid-area: race; }
  #age2 { grid-area: age2; }
  #age { grid-area: age; }
  #fullname2 {
     grid-area: fullname2;
     margin-top: 10px;
}
  #fullname { grid-area: fullname; }
  #appeal2 { grid-area: appeal2; }
  #appeal { grid-area: appeal; }
  #yourtitle2 { grid-area: yourtitle2; }
  #yourtitle { grid-area: yourtitle; }
  #insertButton { grid-area: insertButton; }
  #resul {
     grid-area: resul;
     margin-bottom: 0;
     align-self: start;
}
  #finishedResult {
     grid-area: finishedResult;
     align-items: start;
}
  #resul2 {
     grid-area: resul2;
     margin-bottom: 0;
     align-self: end;
}
  #finishedResult2 {
     grid-area: finishedResult2;
     align-self: start;
}
  #copyButton { grid-area: copyButton; visibility: hidden; }
  #copyButton2 { grid-area: copyButton2; }
  #work2 { grid-area: work2}
  #work { grid-area: work; }

.editable-content {
  border: 1px solid #ccc;
  padding: 10px;
  white-space: pre;
  width: 300px;
  height: 65px;
  overflow: auto;
  background-color: rgba(27, 14, 4, 0.1);
  border: 3px double rgba(42, 14, 8, 0.28);
  border-radius: 3px;
}

</style>
</head>
<body>
<div class="autolz">
  <label for="topicLink2">Ссылка на тему:</label>
  <input type="text" id="topicLink" placeholder="Ссылка на тему">
  <label for="race2">Раса:</label>
  <input type="text" id="race" placeholder="Ваша раса">
  <label for="age2">Возраст:</label>
  <input type="text" id="age" placeholder="ТОЛЬКО цифры">
  <label for="fullname2" id="fullname2">Полное имя*:</label>
  <input type="text" id="fullname" placeholder="*Если отличается от ника">
  <label for="appeal2">Обращение (аристократам):</label>
  <input type="text" id="appeal" placeholder="Как к вам обращаются согласно титулу?">
  <label for="yourtitle2">Титул (аристократам):</label>
  <input type="text" id="yourtitle" placeholder="Ваш титул">
  <label for="work2">Род деятельности:</label>
  <input type="text" id="work" placeholder="Род деятельности">
  <button id="insertButton">Вставить</button>
  <label for="finishedResult" id="resul">Первое ЛЗ:</label>
  <div id="finishedResult" class="editable-content" rows="4" cols="40"></div>
  <label for="finishedResult2" id="resul2">Второе ЛЗ:</label>
  <div id="finishedResult2" class="editable-content" rows="4" cols="40"></div>

  <button id="copyButton">Копировать</button>
  <button id="copyButton2">Копировать</button>
</div>
<script async>
  function iconRedir(element) {
    console.log("Перенаправление...");
  }

  document.getElementById("insertButton").addEventListener("click", function() {
    const topicLink = document.getElementById("topicLink").value;
    const topicId = topicLink.match(/id=(\d+)/)[1];
    const race = document.getElementById("race").value;
    const age = document.getElementById("age").value;
    const fullname = document.getElementById("fullname").value;
    const appeal = document.getElementById("appeal").value;
    const yourtitle = document.getElementById("yourtitle").value;

    // Заменяем значения в шаблоне и формируем результат
    const insertedCode = `\[code\]<a href="#tid=${topicId}"></a><span class="MyredirICon" onclick="iconRedir(this)">${race}, ${age}</span><br><div id='fullname'>${fullname}</div><u>${appeal}</u> ${yourtitle}.\[/code\]` ;
 
    document.getElementById("finishedResult").textContent = insertedCode;

    // Извлекаем URL до символа решетки
    const topicUrl = topicLink.split('#')[0];
    const linkCode = `\[code\]<a href="${topicUrl}">Анкета</a>\[/code\]`;
    document.getElementById("finishedResult2").textContent = linkCode;
  });

document.getElementById("copyButton2").addEventListener("click", function() {
    const finishedResult1 = document.getElementById("finishedResult").textContent;
    const finishedResult2 = document.getElementById("finishedResult2").textContent;
    const combinedResult = finishedResult1 + "\n" + finishedResult2;
    const range = document.createRange();
    const copyElement = document.createElement("textarea");
    copyElement.value = combinedResult;
    document.body.appendChild(copyElement);
    range.selectNode(copyElement);
    window.getSelection().removeAllRanges();
    window.getSelection().addRange(range);
    document.execCommand("copy");
    window.getSelection().removeAllRanges();
    document.body.removeChild(copyElement);
});

</script>

</body>
</html>

[/html]

0

6

[html]
<head>
<link rel="stylesheet" href="https://feathertail.ru/css/relationship.css">
<script src="https://feathertail.ru/scripts/relationship.js"></script>
</head>

<body>
<br><br><span class="custom_tag"><strong>Дневник</strong></span><br><p style="text-align: center; font-size: 8px;"><i>клик на портрет</i><p><br>
    <div class="flex-container">
        <div class="left-side">
            <button class="flex-item-one">
              <img src="https://forumupload.ru/uploads/001c/0b/49/95/654432.gif">
            </button>
            <button class="flex-item-two">
             <img src="https://forumupload.ru/uploads/001c/0b/49/95/841184.gif">
            </button>
            <button class="flex-item-three">
              <img src="https://forumupload.ru/uploads/001c/0b/49/95/151666.gif">
            </button>
            <button class="flex-item-four">
              <img src="https://forumupload.ru/uploads/001c/0b/49/95/18285.gif">
            </button>
        </div>
        <div class="right-side">

<!-- Вступление -->
<div class='zero'>
<p class="quotes">"Человеку надо во что-то верить, я решил поверить в тебя."</p>
<div class="think">
<p>15 ноября 2022 года население Земли достигло отметки в восемь миллиардов человек. Восемь миллиардов. Немыслимое число. Люди окружают нас.
<br>Но сколько из них становится частью нашей жизни? Абсолютное большинство людей являются не более чем блеклыми призраками с которыми мы никогда не встречаемся.
<br>Но есть и другие. Водители. Продавцы. Прохожие. Они пересекают линию нашей жизни на короткие мгновения и устремляются вдаль растворяясь в памяти.
<br>Всё? Нет. Среди этого бесчисленного множества прохожих находятся те, кто становятся нашей семьёй, нашими любимыми, друзьями или даже врагами.
<br>Я посвящаю эти строчки им. </p>
<br><br>
<p class="author">Кеннет Лэйк.</p>
</div>
</div>

<!-- Блок 1 -->           
            <div class='first hidden'>
              <h1 class='name'>Ривер Абруццо</h1>
              <p class="quotes"><i>"Слова только мешают понимать друг друга."</i></p>
              <div class="think"><p>
                Ты - прошлое, которое меня догнало...</p> </div>
              <div class="game-list"><p>Список игр:</p>
              <ul>
                <li><a href="https://thedeepend.ru/viewtopic.php?id=158">Are you a friend or foe? - 09.02.2024</a></li>
              </ul>
            </div></div>
<!-- Конец Блока 1 -->

<!-- Блок 2 -->
           <div class='second hidden'>
             <h1 class='name'>Ноа Джеймс</h1>
             <p class="quotes"><i>"Говорят, ищи, и ты найдёшь, <br>но никто не говорит, что ты найдёшь."</i></p>
            <div class="think">
            <p>Ты иногда бываешь дикой кошкой, или иногда бываешь человеком?</p>
            </div>
            <div class="game-list"><p>Список игр:</p>
            <ul>
             <li><a href="https://noanswer.rusff.me/viewtopic.php?id=210">The Great Unknown - 13.01.2024</a></li>
           </ul>
          </div></div>
<!-- Конец Блока 2 -->

<!-- Блок 3 -->
            <div class='third hidden'>
              <h1 class='name'>Блэйк Томпсон</h1>
              <p class="quotes"> "It's always darkest before the dawn."</p>
              <div class="think"><p>
               Коко Шанель говорила, что "у судьбы нет причин без причины сводить посторонних".
               <br>Какова же причина нашей встречи?
              </p> </div>
              <div class="game-list"><p>Список игр:</p>
              <ul>
                <li><a href="https://noanswer.rusff.me/viewtopic.php?id=230">My Dark Disquiet - 16.12.2023</a></li>
              </ul>
            </div></div>
<!-- Конец Блока 3 -->

<!-- Блок 4 -->
            <div class='fourth hidden'>
              <h1 class='name'>Альбина Морани</h1>
              <p class="quotes">"Я не знаю другого признака величия, как доброта."</p>
              <div class="think">
              <p>Смотрю на тебя и вижу надежду.</p> </div>
              <div class="game-list"><p>Список игр:</p>
              <ul>
                <li><a href="https://thedeepend.ru/viewtopic.php?id=237">Не ходите, дети, в Африку гулять - 06.02.2024</a></li>               
              </ul>
            </div></div>
<!-- Конец Блока 4 -->         
        </div>
    </div>
</body>

[/html]

0

7

[html]
<style>
.body {
    background: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: inline-block !important;
    position: relative !important;
}

#ship13 {
    display: block;
    width: auto;
    box-sizing: border-box;
    padding: 24px;
    max-width: var(--bgw);
    background: #2E2E2E;
    border-left: 3px double #701620;
    border-right: 3px double #701620;
    color: #b3b3b3;
}

#ship13, #ship13h {
    --bgw: 615px;
    --clr1: #520303;
    --clr2: #180a067d;
    --clr3: #000;
    --clr5: #580909;
    margin: auto 0em;
}

.boxf {
    display: block;
    position: relative;
    z-index: 3;
    width: 50%;
    min-height: 50px;
    background: transparent;
    border-right: 1px solid var(--clr3);
    margin-left: calc(0% - 0px);
}

.boxf:nth-child(2n) {
    display: block;
    position: relative;
    margin-top: -40px;
    margin-bottom: -15px;
    margin-left: calc(50% - 1px);
    width: 50%;
    min-height: 50px;
    border-right: 0px none transparent;
    border-left: 1px solid var(--clr3);
}

#ship13 *, #ship13h * {
    box-sizing: border-box;
}

#ship13h {
    display: block;
    box-sizing: border-box;
    width: auto;
    max-width: var(--bgw);
    padding: 14px 0;
    background: #0A0A0A;
    border: 3px double #701620;
    color: #701620;
    text-align: center;
    font-weight: 800;
    font-size: 28px;
    font-family: Simphonia;
    text-shadow: 1px 1px 1px rgb(255 248 243 / 10%);
}

.numbrow {
    display: block;
    margin: auto auto -46px 30px !important;
    z-index: 2;
    width: auto;
    background: transparent;
    text-align: left;
    font-style: normal !important;
    font-size: 76px;
    height: 76px;
    line-height: 76px;
    letter-spacing: -3px;
    font-family: 'Yeseva One', Arial, sans-serif;
    color: #701620;
}

.boxcat {
    display: block;
    padding: 0 10px 4px 10px;
    text-align: left;
    border-bottom: 1px solid var(--clr3);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 16px;
    font-family: 'Playfair Display', Georgia, serif;
    color: #b3b3b3;
}

.textf {
    display: block;
    padding: 20px;
    line-height: 120%;
    text-align: justify;
    font-weight: 400;
    font-size: 12px;
    font-family: Fixedsys !important;
}

.textf a {
    color: #b3b3b3 !important;
    text-transform: none !important;
}

.textf a:hover {
    color: #b3b3b3 !important;
    text-shadow: 2px 2px 5px #701620 !important;
}

.custom_tag {
    font-family: Simphonia;
    font-size: 28px;
    font-style: normal;
    text-decoration: underline;
    text-decoration-thickness: 4px;
    text-decoration-color: #00000030;
    text-decoration-skip-ink: none;
    text-underline-offset: 3px;
    display: block;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.0;
    color: #701620 !important;
}
</style>

<div class="body">
<br><br><span class="custom_tag"><strong>Дневник</strong></span><br><br>
<link href="https://fonts.googleapis.com/css2?family=PT+Sans&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Yeseva+One&display=swap" rel="stylesheet">

<div id="ship13h">2023 год</div>
<div id="ship13">
<!--- НАЧАЛО БЛОКОВ --->

<!--- День/месяц №1 --->
<div class="boxf"><em class="numbrow">16</em><div class="boxcat">Декабря</div>
<div class="textf">
<p><a href="https://thedeepend.ru/viewtopic.php?id=230">"My Dark Disquiet"</a>
<br><br><i>Экзюпери писал: "Я мыслю противоречиями. Моя истина размыта на куски,
<br>и рассматривать их я могу только каждый в отдельности."
<br>Два человека. Два противоречия. Множество истин.
<br>И одна встреча.</i></p>
</div></div></div>

<div class="body">
<div id="ship13h">2024 год</div>
<div id="ship13">
<!--- НАЧАЛО БЛОКОВ --->
<!--- День/месяц №1 --->
<div class="boxf"><em class="numbrow">13</em><div class="boxcat">Января</div>
<div class="textf">
<p><a href="https://thedeepend.ru/viewtopic.php?id=210">"The Great Unknown"</a>
<br><br><i>Иногда способности одарённых это не дар, но и проклятие. Иногда оно становится проклятием неожиданно. Как выживать в мире, который не готов тебя принять? Каждому суждено найти свой ответ на этот вопрос, но прежде чем это случится, придётся окунуться в неизвестность.</i></p>
</div></div>

<!--- День/месяц №2 --->
<div class="boxf"><em class="numbrow">06</em><div class="boxcat">Февраля</div>
<div class="textf">
<p><a href="https://thedeepend.ru/viewtopic.php?id=237">"Не ходите, дети, в Африку гулять"</a>
<br><br><i>Добро может иметь последствия, а их бывает невозможно разгрести в одиночку.</i></p>
</div></div>

<!--- День/месяц №3 --->
<div class="boxf"><em class="numbrow">09</em><div class="boxcat">Февраля</div>
<div class="textf">
<p><a href="https://thedeepend.ru/viewtopic.php?id=158">"Are you a friend or foe?"</a>
<br><br><i>Someone hasn't even changed, but the other one...</i></p>
</div></div>

<!--- День/месяц №4 --->

<div class="boxf"><em class="numbrow">14</em><div class="boxcat">Июня</div>
<div class="textf">
<!-- <p><a href="ссылка">Эпизод 1</a> - а здесь небольшое его описание</p> -->
<!-- <p><a href="ссылка">Эпизод 2</a> - и разнообразные пояснения к нему</p> -->
<!-- <p><a href="ссылка">Эпизод 3</a> - слова прощания</p> -->
</div></div>

<!--- День/месяц №5 --->
<div class="boxf"><em class="numbrow">15</em><div class="boxcat">Июня</div>
<div class="textf">
</div></div>

<!--- День/месяц №6 --->
<div class="boxf"><em class="numbrow">16</em><div class="boxcat">Июня</div>
<div class="textf">
</div></div></div>

<!--- КОНЕЦ БЛОКОВ ---></div>
</html>
[/html]

0


Вы здесь » Feathertail » Тестовый форум » Скрипты


Рейтинг форумов | Создать форум бесплатно