Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
529 Vistas

Hi everyone,

I run a tool-based site https://whitescreentest.net/ that allows users to test screens using full-screen white, black, and other color backgrounds—useful for spotting dead pixels, screen tint, etc.

I'm looking to integrate a similar tool into an Odoo Website for product display testing (e.g., showcasing monitors or screens). Specifically, I want to:

  • Embed a full-screen color tool into a product page
  • Allow users to choose from preset colors or custom RGB values
  • Enable a click-to-fullscreen feature for the display area
  • Possibly log or track usage sessions (optional)

Has anyone here integrated custom interactive tools into an Odoo website like this? Would it be better to use a custom module, or can this be handled via embedded JavaScript/HTML in Odoo's website builder?

Avatar
Descartar
Mejor respuesta

Create a Custom Snippet or Embed Code

Use the Website → Edit → HTML/Embed Code block to paste your custom tool’s HTML/JS.
Example:
​<div id="colorDisplay" style="width:100%;height:100vh;background:#ffffff;cursor:pointer;" onclick="toggleFullscreen(this)">

</div>


<div style="margin-top:20px;">

  <label>Pick a Color: </label>

  <input type="color" id="colorPicker" onchange="changeColor(this.value)">

  <label> or enter RGB: </label>

  <input type="text" id="rgbInput" placeholder="#FFFFFF" oninput="changeColor(this.value)">

</div>


<script>

function changeColor(color) {

  document.getElementById("colorDisplay").style.background = color;

}

function toggleFullscreen(elem) {

  if (!document.fullscreenElement) {

    elem.requestFullscreen().catch(err => alert(err.message));

  } else {

    document.exitFullscreen();

  }

}

</script>

i hope it is usefull

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
ene 24
1279
2
may 23
8117
1
feb 22
23162
5
dic 21
16224
0
dic 20
4365