aansbacher / debate

2 stars 0 forks source link

תמחור #40

Open aansbacher opened 1 year ago

aansbacher commented 1 year ago

אני לא ממש מבין במחירים, אבל עיקר עלויות הפיתוח יהיו בעיצוב הממשק ובחיבורו לבינה מלאכותית שתזהה עמדות הקרובות לאמת ע''י מגוון פרמטרים שנבחר בקפידה.

אני רוצה להעריך את העלות ב200k-500k

eranws commented 1 year ago

כמה תתמחר עלות של הקמת דף לדוגמא עם שתי קופסאות טקסט.

שאלת בונוס בכמה תתמחר שמילים רעות יסומנו בצבע נגיד סגול

eranws commented 1 year ago

מצאתי ליד הפח זבל כמה חתיכות קוד, שימושי לך?

To add checks and highlight bad words with a yellow background, you can use JavaScript to handle the input and update the styling accordingly. Here's an updated version of the HTML code with JavaScript:

<!DOCTYPE html>
<html>
<head>
  <title>Blue and Red Input Boxes</title>
  <style>
    body {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      margin: 0;
    }
    .container {
      display: flex;
    }
    .blue-input {
      background-color: blue;
      padding: 10px;
      color: white;
    }
    .red-input {
      background-color: red;
      padding: 10px;
      color: white;
    }
    .yellow-background {
      background-color: yellow;
    }
  </style>
</head>
<body>
  <div class="container">
    <input class="blue-input" type="text" placeholder="Blue input box" oninput="checkForBadWords(this)">
    <input class="red-input" type="text" placeholder="Red input box" oninput="checkForBadWords(this)">
  </div>

  <script>
    const badWords = ['bad', 'inappropriate', 'offensive']; // Add your list of bad words here

    function checkForBadWords(inputElement) {
      const inputValue = inputElement.value.toLowerCase();
      const words = inputValue.split(/\s+/);

      words.forEach((word) => {
        if (badWords.includes(word)) {
          const regex = new RegExp('\\b' + word + '\\b', 'gi');
          inputElement.value = inputElement.value.replace(regex, (matched) => `<span class="yellow-background">${matched}</span>`);
        }
      });
    }
  </script>
</body>
</html>

Now, when you enter any bad word from the badWords array in either of the input boxes, it will be highlighted with a yellow background. Note that this implementation only highlights exact word matches, not substrings. You can customize the badWords array with your desired list of bad words.