when i load the page for the first time it doesnt work until i refresh it

i have a problem, in my code i created horizontal scrolling function for navbar and when i open live server for the first time it doesnt work until i refresh it, i try to wrapp the function by domcontentload and windowload evetns and because of working with fetch i put inside events requestanimationframe funtion for wait until the page loads completely but it still not working

// function for all horizontal scrolling
function enableHorizontalScroll(listId) {

  const list = document.querySelector(`#${listId}`);
  let maxScroll = list.scrollWidth - list.offsetWidth;
  let startX = 0;
  let currentX = 0;
  let finalOffset = 0;
  let lastX = 0;

  function startTouch(e) {
    startX = e.touches[0].clientX + lastX;
  }

  function moveTouch(e) {
    // prevent vertical scrolling
    e.preventDefault();
    currentX = e.touches[0].clientX;
    finalOffset = startX - currentX;

    if (finalOffset < 0) finalOffset = 0;
    if (finalOffset > maxScroll) finalOffset = maxScroll;
    list.style.transform = `translateX(-${finalOffset}px)`;
    lastX = finalOffset;
  }

  list.addEventListener("touchstart", startTouch);
  list.addEventListener("touchmove", moveTouch);
}
enableHorizontalScroll("product-selection-scroll");
<div class="kategori-container d-sm-none">
  <ul id="product-selection-scroll">
    <li class="active">men's clothing</li>
    <li>women's clothing</li>
    <li>electronics</li>
    <li>jewelery</li>
  </ul>
</div>

Recharts tick on y axis doesn’t align with CartesianGrid

As you can see in the 1st picture, the text “16L” doesn’t vertically align with the line of CartesianGrid. I try using syncWithTicks={true} but doesn’t work. Is it possible to adjust the position of the topmost tick so that it aligns?

'use client'

import React from "react";
import {
  Bar,
  BarChart,
  CartesianGrid,
  ResponsiveContainer,
  XAxis,
  YAxis,
} from "recharts";

export const InnerBarChart = () => {
  const formattedWaterUsage = [
    {
      date: "00:00",
      startTs: 1751958000000,
      endTs: 1751961599000,
      volume: 12.337,
    },
    {
      date: "01:00",
      startTs: 1751961600000,
      endTs: 1751965199000,
      volume: 14.179,
    },
    {
      date: "02:00",
      startTs: 1751965200000,
      endTs: 1751968799000,
      volume: 11.665,
    },
    {
      date: "03:00",
      startTs: 1751968800000,
      endTs: 1751972399000,
      volume: 13.541,
    },
  ];

  return (
    <ResponsiveContainer width={"100%"} height={600}>
      <BarChart
        width={877}
        height={409}
        data={formattedWaterUsage}
        margin={{
          top: 0,
          right: 50,
          left: 50,
          bottom: 0,
        }}
        {...{
          overflow: "visible",
        }}
      >
        <CartesianGrid stroke="#ccc" vertical={false} syncWithTicks={true} />
        <XAxis
          dataKey="date"
          tickLine={false}
          axisLine={false}
        />
        <YAxis
          type="number"
          dx={-10}
          axisLine={false}
          tickLine={false}
          tick={{ fontSize: 18 }}
          tickFormatter={(value) => {
            return `${value} L`;
          }}
        />
        <Bar dataKey="volume" fill="#51A9FE" />
      </BarChart>
    </ResponsiveContainer>
  );
};

Actual Result
enter image description here

Expected Result
enter image description here

Can initializing useState with a value act as a cache and prevent recomputing that value?

This may be a simple question but in our UI app we have a pattern my team has used to wrap an object of translation strings from i18next into a state which is never updated. The idea is, the translation function is used to generate the translations once and set into a state that is never updated, thus, when page re-renders for other reasons, it never re-calls the functions.

  const [translations] = useState({
    header: translate('translation.string.goes.here')
    welcomeMessage: translate('translation.string.goes.here')
  });

so then we can do something like translations.header and if page re-renders, the translate method isnt called anymore and basically, in a sense, caching the translations.

Is our assumption correct that translate will not be called again on re-renders?

Is it a good coding practice to use a React state to be set once with the expectation it will never change to prevent re-renders?

This may be a simple question but in our UI app we have a pattern my team has used to wrap an object of translation strings from i18next into a state which is never updated. The idea is, the translation function is used to generate the translations once and set into a state that is never updated, thus, when page re-renders for other reasons, it never re-calls the functions.

  const [translations] = useState({
    header: translate('translation.string.goes.here')
    welcomeMessage: translate('translation.string.goes.here')
  });

so then we can do something like translations.header and if page re-renders, the translate method isnt called anymore and basically, in a sense, caching the translations.

  1. Is this working as the expected result mentioned above? or is this way off what useState is?
  2. is this good or bad practice for this pattern in React?

HttpOnly:false cookies Intercom

I learned that Intercom uses httpOnly:false cookies to store its sessions (user sessions on the app that has integrated Intercom, in order to load conversations, etc.).

This obviously poses significant risks: an attacker could retrieve these cookies via JavaScript and impersonate someone. Even if it doesn’t serve much purpose, it would be possible.

So I’m wondering: what security mechanisms does Intercom implement to secure sessions and access? Because it seems strange to me that such a large company relies on such a fragile system; they must necessarily do something extra to secure their sessions, something I don’t understand yet.

I tried to find out and I didn’t understand it at all. I’m looking to find out: what mechanisms Intercom has implemented to secure in-app sessions with their widget, despite the httpOnly:false cookies.

Javascript; XMLHttpRequest; read .txt-File

got a problem with the following.
I’m programming a little controller for an IoT. It’s based on an Arduino wich is programmed in C#. The board makes a network device wich is connected to local lan by a cat-cable. when I open a browser and type in the ip-adress a htm-file is called an shown in the browser. In the htm I got a few inputs to make some settings. on pressing submit the values thrown back to my Arduino an get stored in an .txt file. when I start my Arduino this values are loaded ( i.e. an ip-address or something else ).
Now I want that the htm-file loads this text-file, too. I tried a lot but nothing seems to work without problems. The following code is placed under the closing -Tag in my htm-file.

<script>
    function txtLaden(path, callback) {
        var xhr = new XMLHttpRequest();
        xhr.onreadystatechange = function() {
            if (xhr.readyState == 4) {
                if (xhr.status == 200) {
                    callback(xhr.responseText);
                } else {
                    callback(null);
                } // ende if / else
            } // ende if
        }; // ende onreadystate
        xhr.open("GET", path);
        xhr.send();
    } // ende txtLaden
    
    function txtAusgeben(fileData) {
        if (!fileData) {
            console.log("2: --- FEHLER");
            return;
        } // ende if
        console.log("2: --- OKAY!!! ||| " + fileData.length);
    } // ende txtAusgeben
    
    // aufruf
    txtLaden("CONFIG.TXT", txtAusgeben);
</script>

In console I get an XML-Error: Undefined Entity in row x and col y.
But: After this line I get: 2: — OKAY!!! ||| 17731 – the length of fileData.
If I delete the .length I only get 2: — OKAY!!! |||.

In my .txt-file I have only one row with max 200 characters – formatted as JSON-code.

Can someone point me to my error or make a suggestion?

SD-card is root. And there where only the index.htm a the config.txt – without other directories.

Thanks in advance!

How to support photoshop mime types in Windows?

I tried asking this question before but didn’t get a definitive answer. What’s the mime type for photoshop files on windows. I’m trying to upload photoshop files and only allowing for specific mime types that relate to photoshop. On mac, it’s

"image/vnd.adobe.photoshop",
"application/vnd.adobe.photoshop",
"application/x-photoshop"

I also tried application/octet-stream but that didn’t work.

but on Windows, photoshop files have a different mime type. I don’t have a windows computer so I can’t figure it out. Does anyone know?

I’m doing the following to check the mime type on Windows

const file = input.files[0];
console.log(file.type); // should return "image/vnd.adobe.photoshop" for .psd

How to delete an item in an immutable signal array or a key/value in a signal object?

To update items into an immutable array, we can easily do:

array = signal([1,2,3]);
...

...
this.array.update(item => [ ...item, 'newItem' ]);

To update items into an immutable object easily do:

object = signal({});
...

...
this.object.update(obj => ({ ...obj, key :'newValue' }))

But how to delete some items of an array. Also please refer to demo@stackblitz

resizeObserver with dynamically changing height of a absolutely positioned div

I am trying to tie resizeObserver checking to dynamically updated height of an absolutely positioned div. Use case: a modal window wit various amount of copy popping up.

Here’s a portion of code that won’t trigger console.log with absolutely positioned div ( #absolute) in HTML. But when the position is changed to static – everything works just fine.

  const observer = new ResizeObserver(entries => {

        let finalScrollHeight = Math.max(
            document.body.scrollHeight, document.documentElement.scrollHeight,
            document.body.offsetHeight, document.documentElement.offsetHeight,
            document.body.clientHeight, document.documentElement.clientHeight
        );

        console.log(finalScrollHeight);

    });

    observer.observe(document.documentElement);

Here is a working example:
https://jsfiddle.net/n2xydobf/1/

(I have added various heights to track the actual height change )

Thank you very much for our suggestions in advance.

PS: just in case- here’s fully working code as a CODE (not a link)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>scrollHeight</title>
    <style>
        html, body {
            height: auto !important;
            min-height: 100%;
        }

        body {
            overflow: auto !important;
        }

        #absolute {

            min-height: 100px;
            width: 50vw;
            background: #000;
            position: absolute;
            top: 0;
            left: 0;
            color: #fff;
            line-height: 2rem;
            box-sizing: border-box;
            padding: 10px;
            hyphens: auto;


        }

        #msg {
            padding: 10px;
            text-align: right;
            background: #af0000;
            color: #fff;

        }
 
        #button {
            padding: 10px;
            background: #ccc;
            text-align: right;
            cursor: pointer;
        }

        #main_container {
            background: #555;
            min-height: 220px;
        }
    </style>
</head>
<body>

<div id="main_container">
    <div id="absolute"></div>
    <div id="button">Click me</div>
    <div id="msg">Msg</div>
</div>

<script>
    
    const observer = new ResizeObserver(entries => {

        let finalScrollHeight = Math.max(
            document.body.scrollHeight, document.documentElement.scrollHeight,
            document.body.offsetHeight, document.documentElement.offsetHeight,
            document.body.clientHeight, document.documentElement.clientHeight
        );

        if (document.body.scrollHeight > document.documentElement.scrollHeight) {
            finalScrollHeight = document.body.scrollHeight;
        } else {
            finalScrollHeight = document.documentElement.scrollHeight
        }

        console.log(finalScrollHeight);

    });

    observer.observe(document.documentElement);

    var text1 = "In which it is proved that, notwithstanding their names’ ending in os and is, the heroes of the story which we are about to have the honor to relate to our readers have nothing mythological about them.A short time ago, while making researches in the Royal Library for my History of Louis XIV., I stumbled by chance upon the Memoirs of M. d’Artagnan, printed—as were most of the works of that period, in which authors could not tell the truth without the risk of a residence, more or less long, in the Bastille—at Amsterdam, by Pierre Rouge. The title attracted me; I took them home with me, with the permission of the guardian, and devoured them. It is not my intention here to enter into an analysis of this curious work; and I shall satisfy myself with referring such of my readers as appreciate the pictures of the period to its pages. They will therein find portraits penciled by the hand of a master; and although these squibs may be, for the most part, traced upon the doors of barracks and the walls of cabarets, they will not find the likenesses of Louis XIII., Anne of Austria, Richelieu, Mazarin, and the courtiers of the period, less faithful than in the history of M. Anquetil.In which it is proved that, notwithstanding their names’ ending in os and is, the heroes of the story which we are about to have the honor to relate to our readers have nothing mythological about them.A short time ago, while making researches in the Royal Library for my History of Louis XIV., I stumbled by chance upon the Memoirs of M. d’Artagnan, printed—as were most of the works of that period, in which authors could not tell the truth without the risk of a residence, more or less long, in the Bastille—at Amsterdam, by Pierre Rouge. The title attracted me; I took them home with me, with the permission of the guardian, and devoured them. It is not my intention here to enter into an analysis of this curious work; and I shall satisfy myself with referring such of my readers as appreciate the pictures of the period to its pages. They will therein find portraits penciled by the hand of a master; and although these squibs may be, for the most part, traced upon the doors of barracks and the walls of cabarets, they will not find the likenesses of Louis XIII., Anne of Austria, Richelieu, Mazarin, and the courtiers of the period, less faithful than in the history of M. Anquetil.";
    var text2 = 'This being understood, let us proceed with our history.';
    var text3 = ' I stumbled by chance upon the Memoirs of M. d’Artagnan, printed—as were most of the works of that period, in which authors could not tell the truth without the risk of a residence, more or less long, in the Bastille—at Amsterdam, by Pierre Rouge. The title attracted me; I took them home with me, with the permission of the guardian, and devoured them.I stumbled by chance upon the Memoirs of M. d’Artagnan, printed—as were most of the works of that period, in which authors could not tell the truth without the risk of a residence, more or less long, in the Bastille—at Amsterdam, by Pierre Rouge. The title attracted me; I took them home with me, with the permission of the guardian, and devoured them.';
    var text4 = "In which it is proved that, notwithstanding their names’ ending in os and is, the heroes of the story which we are about to have the honor to relate to our readers have nothing mythological about them.A short time ago, while making researches in the Royal Library for my History of Louis XIV., I stumbled by chance upon the Memoirs of M. d’Artagnan, printed—as were most of the works of that period, in which authors could not tell the truth without the risk of a residence, more or less long, in the Bastille—at Amsterdam, by Pierre Rouge. The title attracted me; I took them home with me, with the permission of the guardian, and devoured them. It is not my intention here to enter into an analysis of this curious work; and I shall satisfy myself with referring such of my readers as appreciate the pictures of the period to its pages. They will therein find portraits penciled by the hand of a master; and although these squibs may be, for the most part, traced upon the doors of barracks and the walls of cabarets, they will not find the likenesses of Louis XIII., Anne of Austria, Richelieu, Mazarin, and the courtiers of the period, less faithful than in the history of M. Anquetil.In which it is proved that, notwithstanding their names’ ending in os and is, the heroes of the story which we are about to have the honor to relate to our readers have nothing mythological about them.A short time ago, while making researches in the Royal Library for my History of Louis XIV., I stumbled by chance upon the Memoirs of M. d’Artagnan, printed—as were most of the works of that period, in which authors could not tell the truth without the risk of a residence, more or less long, in the Bastille—at Amsterdam, by Pierre Rouge. The title attracted me; I took them home with me, with the permission of the guardian, and devoured them. It is not my intention here to enter into an analysis of this curious work; and I shall satisfy myself with referring such of my readers as appreciate the pictures of the period to its pages. They will therein find portraits penciled by the hand of a master; and although these squibs may be, for the most part, traced upon the doors of barracks and the walls of cabarets, they will not find the likenesses of Louis XIII., Anne of Austria, Richelieu, Mazarin, and the courtiers of the period, less faithful than in the history of M. Anquetil.";
    var text5 = 'This being understood, let us proceed with our history.';
    var text6 = ' I stumbled by chance upon the Memoirs of M. d’Artagnan, printed—as were most of the works of that period, in which authors could not tell the truth without the risk of a residence, more or less long, in the Bastille—at Amsterdam, by Pierre Rouge. The title attracted me; I took them home with me, with the permission of the guardian, and devoured them.I stumbled by chance upon the Memoirs of M. d’Artagnan, printed—as were most of the works of that period, in which authors could not tell the truth without the risk of a residence, more or less long, in the Bastille—at Amsterdam, by Pierre Rouge. The title attracted me; I took them home with me, with the permission of the guardian, and devoured them.';


    let button = document.getElementById('button');
    let absoluteDiv = document.getElementById('absolute');
    let msgDiv = document.getElementById('msg');

    const texts_array = [text1, text2, text3, text4, text5, text6];

    button.addEventListener('click', function () {

        const random = Math.floor(Math.random() * texts_array.length);
        absoluteDiv.innerHTML = texts_array[random];

        msgDiv.innerHTML = 'document.body.scrollHeight: ' + document.body.scrollHeight +
            '<br />document.documentElement.scrollHeight: ' + document.documentElement.scrollHeight +
            '<br />document.body.offsetHeight: ' + document.body.offsetHeight +
            '<br />document.documentElement.offsetHeight: ' + document.documentElement.offsetHeight +
            '<br />document.body.clientHeight' + document.body.clientHeight +
            '<br />document.documentElement.clientHeight: ' + document.documentElement.clientHeight;


    }, false);

 
</script>

</body>
</html>

WebXr Question .how to move object??? and i want to select

I’m building an AR furniture placement app using Three.js and WebXR.
I want to implement object selection via long-press and rotation via two-finger drag.

Below is part of my logic using raycaster and touch event handlers:

    // inside onTouchStart
raycaster.setFromCamera(...);
const intersects = raycaster.intersectObjects(...);
if (intersects.length > 0) {
  selectObject(...);
}

What is the best way to manage object selection and interaction (rotate/delete) in Three.js with WebXR?
Any example projects or libraries that help with AR interactions?

https://github.com/2025-team-k-techeer/WebXR_for_AR/tree/dev

you can see the code at dev branch

Controlled Select Element Loses Value After Form Submission with useActionState in Next.js

I’m building a form—ideally using the useActionState server-action setup—that needs to persist its values during submissions. The problem is, I can’t use the defaultValue prop on the element, because I need it to be a controlled component so I can update it dynamically on the client side.

My current setup

I tried making the controlled using local state, but then the server state doesn’t apply correctly after submission. It resets the select value to be the first option, even though the server state and local client state both have most up to date values. Upon submitting again, it then submits that first incorrect select option (“Mini”).

What can I do in this situation? Move to javascript query selectors?

I left a very simple example of my problem below.

Form:

"use client";

import { useActionState, useEffect, useState } from "react";
import { saveFormData } from "./actions";

type FormState = {
  group: string;
};

const defaultState: FormState = {
  group: "Junior",
};

export default function FormExample() {
  const [state, formAction] = useActionState(saveFormData, defaultState);

  const [group, setGroup] = useState(state.group);

  useEffect(() => {
    if (state.group !== group) {
      setGroup(state.group);
    }
  }, [state.group]);

  return (
    <form action={formAction}>
      <label>
        Group:
        <select
          name="group"
          value={group}
          onChange={(e) => setGroup(e.target.value)}
        >
          <option value="Mini">Mini (11–12)</option>
          <option value="Junior">Junior (12–14)</option>
          <option value="Senior">Senior (15+)</option>
        </select>
      </label>

      <button type="submit" className="btn">
        Submit
      </button>
    </form>
  );
}

Server action:

"use server";

export async function saveFormData(prevState: unknown, formData: FormData) {
  const group = String(formData.get("group"));

  console.log("group on server: ", group);
  
  // Persist values here (e.g., database, cookies, etc.)
  return { group };
}

function only fires on second click? [closed]

function should be firing on the first click, but it isn’t firing

cpstsub.addEventListener('click', function(e) {
  if (cmmsg == '') {

  } else {
    var datax = {
      'msg': cmmsg,
      'postname': postname,
      'add_cmm': true,
    };

    $.ajax({
      type: "POST",
      url: "cmmntapi.php",
      data: datax,
      dataType: "dataType",
      success: function (data) {
      }
    });

    var datanme = {
      'postname': postname,
    };

    $.ajax({
      url: 'fetch_cmmnt.php',
      method: "POST",
      data: datanme,
      success: function(data){
        cmbhx.html(data);
      }
    });
  }
})

after code is implemented its only retieving after second click

Argument of type ‘Promise’ is not assignable to parameter of type ‘Json’

Im trying to code in a new, seems to be self-invented javascript programming language in “Pylon.bot”.

My code is as follows:

channelMessages.put("9", channelMessages.get("8"));
channelMessages.put("8", channelMessages.get("7"));
channelMessages.put("7", channelMessages.get("6"));
channelMessages.put("6", channelMessages.get("5"));
channelMessages.put("5", channelMessages.get("4"));
channelMessages.put("4", channelMessages.get("3"));
channelMessages.put("3", channelMessages.get("2"));
channelMessages.put("2", channelMessages.get("1"));

The declaration according to SDK is for:

KVstorage.put ( 'string', 'json' )

KVstorage.get returns "Promise<Json>"

When trying to assign the result from get into the put, I get:

Argument of type 'Promise<Json>' is not assignable to parameter of type 'Json'

What im doing wrong? Why can’t I assign a Json to a Json?

How to create a fully transparent rectangle on HTML Canvas that is actually rendered?

I’m trying to draw a rect on a Canvas with partial and full transparency.
Everything works fine until we get to a point where the alpha value is 0.
Then all of a sudden the rectangle isn’t rendered at all.

Here is an example:

const canvas1 = document.querySelector("#one");
const ctx1 = canvas1.getContext('2d');

//red (half visible)
ctx1.fillStyle = `rgba(255, 0, 0, 0.5)`;
ctx1.fillRect(0, 0, 50, 100);

//green (barely visible)
ctx1.fillStyle = `rgba(0, 255, 0, 0.1)`;
ctx1.fillRect(60, 0, 50, 100);

//blue (invisible)
ctx1.fillStyle = `rgba(0, 0, 255, 0)`;
ctx1.fillRect(120, 0, 50, 100);
#one {
  background-color: black;
  width: 300px;
  height: 200px;
}
<canvas id="one"></canvas>

The code produces 3 rectangles (one red, one green, one blue).
While this seems to work fine in the browser the last rectangle (blue) will actually not be rendered at all.

When I copy the rendered image into Photoshop/GIMP (or whatever) and toggle the alpha channel then only the first two rectangles appear:

image in gimp with toggled alpha channel

What I try to achieve is a fully transparent rectangle that actually is there, but invisible.

I wonder if this is possible at all?

Fix blank space at the top of image (JS)

I’m using the Internet Archive BookReader> https://github.com/internetarchive/bookreader
I’ve set up a book using images but at the top there is always a blank space

blankspace

This is controlled by JS file that has the following (screenshot is from images 1 and 2):

I had the same problem with the bottom and was able to properly scale it by adjusting the height to 1130 but can’t get rid of the extra space above.
This uses some CSS but for what I understand the pages are controlled by the JS file i shared

// Create the BookReader object
function instantiateBookReader(selector, extraOptions) {
  selector = selector || '#BookReader';
  extraOptions = extraOptions || {};
  var options = {
    ppi: 100,
    data: [
      [{
        width: 800,
        height: 800,
        uri: '/assets/images/Chiloe/Lomo.png'
      }, ],
      [{
        width: 800,
        height: 1130,
        uri: '/assets/images/Chiloe/Portada Frente.png'
      }, ],
      [{
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/1.CanaldeChacao.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/2.CerroMirador.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/3.Museo de las Iglesias.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/4.Islotes.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/5.Quemchi.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/6.Aucar.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/7.Dalcahue.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/8.Castro.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/9.Cucao.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/10.Muelle.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/11.Gruta.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/12.Puqueldón.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/13.Chonchi.png'
        },
        {
          width: 800,
          height: 1130,
          uri: '/assets/images/Chiloe/Portada Trasera.png'
        },
      ]
    ],

    // Book title and the URL used for the book title link
    bookTitle: 'Cartografía poética de Chiloé',


    // thumbnail is optional, but it is used in the info dialog
    thumbnail: '/assets/images/Chiloe/Portada Frente.png',
    // Metadata is optional, but it is used in the info dialog
    metadata: [{
        label: 'Title',
        value: 'Cartografía Poética de Chiloé'
      },
      {
        label: 'Author',
        value: 'Jairo Manzur'
      },
      {
        label: 'Demo Info',
        value: ' Este poemario fue escrito en el 2020 y representa visualmente los diferentes lugares en los que estuve en la isla de Chiloé.'
      },
    ],

    // Override the path used to find UI images
    imagesBaseURL: '../assets/images/',

    ui: 'full', // embed, full (responsive)

    el: selector,
  };
  $.extend(options, extraOptions);
  var br = new BookReader(options);
  br.init();
}