Nuxt 3: useSeoMeta Not Rendering Meta Tags in Page Source (SSR)

I’m using Nuxt 3 and trying to set static meta tags for my About page using useSeoMeta.
Here’s the relevant code from pages/about.vue:

<script setup lang="ts">
// Meta SEO
const description =
  "Lorem ipsum";
const title = "About";

// SEO META
useSeoMeta(
  {
    title: title,
    description: description,
    ogTitle: title,
    ogDescription: description,
    ogImage: "https://example.com/img/thumbnail",
    ogUrl: "https://slavic.media/about",
    twitterTitle: title,
    twitterDescription: description,
    twitterImage: "https://example.com/img/thumbnail",
    twitterCard: "summary",
  },
  { priority: 1 }
);
</script>

Problem:

The meta tags show up in Nuxt DevTools and in the browser after hydration, but do not appear in the server-rendered page source (view-source:).
Social media scrapers (Facebook, LinkedIn, etc.) do not see the correct meta tags.
Other info:

I have a titleTemplate in app.vue via useHead.
Common head features which are working (lang, favicon, etc.) are set in nuxt.config.ts.
SSR is enabled (not SPA mode).
This happens even with static, non-reactive meta values.
How can I get Nuxt to render these meta tags in the server HTML so scrapers can see them?

Any help is appreciated!

setTimeout + setInterval behave inconsistently in inative tab on Chrome

I’m trying to implement a simple behavior where a function starts running repeatedly after a delay once the user leaves the browser tab (i.e., switches to another tab). For example:

After 3 seconds of the tab being inactive,

Start toggling tab title every 2 seconds.

This works perfectly in Firefox, but in Chrome, the timing is inconsistent:

The delayed setTimeout seems to trigger,

The setInterval starts toggling,

Then it stalls unpredictably — sometimes after a few iterations (e.g., 18 toggles), then resumes later, or stops entirely for a while.

window.addEventListener("blur", () => {
    const delayBeforeStart = 10000;
    const blinkInterval = 2000;

    const originalTitle = document.title;
    const alternateTitle = "Come back!";

    let intervalId = null;

    const timeoutId = setTimeout(() => {
        if (document.hidden) {
            intervalId = setInterval(() => {
                document.title = document.title === originalTitle ? alternateTitle : originalTitle;
            }, blinkInterval);
        }
    }, delayBeforeStart);

    window.addEventListener("focus", () => {
        clearTimeout(timeoutId);
        if (intervalId) {
            clearInterval(intervalId);
            intervalId = null;
            document.title = originalTitle;
        }
    });
});


Works smoothly in Firefox.

In Chrome, the interval often gets throttled or even stops entirely after some time when the tab is in the background.

This appears related to Chrome’s background timer throttling

Flexdatalist show code as text when search for text in HTML

I’m using flexdatalist. In this datalist, I’m putting html at end of visible property to show ID.

When each for some letter like “a” or “smal” you will see the same search line but with the html code showed as text instead of being interpreted.

example of issue

(here, the red part isn’t wanted and should not appear)

Here is an example of code:

const users = [
  {
    UserId: 1,
    Identity: "User A",
    Title: "M."
  },
  {
    UserId: 2,
    Identity: "User B",
    Title: "M."
  },
  {
    UserId: 3,
    Identity: "User C",
    Title: "Mlle."
  },
  {
    UserId: 4,
    Identity: "User D",
    Title: "Ms."
  }
];

for(var user of users) {
  user.VisualName = user.Title + " " + user.Identity + "<small>#" + user.UserId + "</small>";
}

$("#User").flexdatalist({
    minLength: 0,
    visibleProperties: ["VisualName"],
    searchIn: "VisualName",
    valueProperty: "UserId",
    textProperty: "Identity",
    searchContain: true,
    selectionRequired: true,
    noResultsText: "no entries",
    data: users
});
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4Q6Gf2aSP4eDXB8Miphtr37CMZZQ5oXLH2yaXMJ2w8e2ZtHTl7GptT4jmndRuHDT" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-j1CDi7MgGQ12Z7Qab0qlWQ/Qqz24Gc6BM0thvEMVjHnfYGF0rmFCozFSxQBxwHKO" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-flexdatalist/2.3.0/jquery.flexdatalist.min.js" integrity="sha512-JEX6Es4Dhu4vQWWA+vVBNJzwejdpqeGeii0sfiWJbBlAfFzkeAy6WOxPYA4HEVeCHwAPa+8pDZQt8rLKDDGHgw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-flexdatalist/2.3.0/jquery.flexdatalist.min.css" integrity="sha512-feX1WY95JHQ//uffCG42xy0PofA6DAZSEgIQMMOmRBbSmmOoz/J52azXXLM3kYa9EkQ5PlOHFFCgqpnPJ1oYpg==" crossorigin="anonymous" referrerpolicy="no-referrer" />

<div class="row offset-2 col-8">
    <label for="User" class="form-control-label">Users</label>
    <div class="input-group">
        <input class="form-select flexdatalist" id="User" name="User" placeholder="Search a user ...">
        <button class="btn btn-secondary" type="button" name="UnselectUser"><i class="bi bi-trash"></i></button>                        
    </div>
</div>

How can I fix it?

How to correlate requests and responses using Axios interceptors?

I’m using Axios to make HTTP requests, often concurrently, e.g. using Promise.all. In this scenario, I can’t rely on the order of requests and responses to correlate them.

I want to reliably match each response (including errors) to its original request, even when they happen concurrently.

So far, I’ve identified two possible solutions:

  • Use a request interceptor to attach a unique ID to the headers. Later, read this ID
    in the response interceptor to correlate the pair.
  • Store the Axios request config from the request interceptor. Compare
    it with the response.config when the response comes back.

Are there any better or more efficient ways to correlate requests and responses. Is there a best practice for handling this, especially when dealing with concurrent requests?

Math ain’t Mathing — Why is my MET-based calorie calculator returning massive numbers at low speeds?

Video link of Bug :

// Dropdown handling
const exerciseItems = document.querySelectorAll("#exercise-dropdown li");

exerciseItems.forEach(item => {
    item.addEventListener('click', () => {
        document.getElementById("exercise-type").textContent = item.textContent;
    }); 
});

const weightInput = document.getElementById('weight');
const distanceInput = document.getElementById("distance");
const speedInput = document.getElementById("speed");
const caloriesInput = document.getElementById('Calories');
const submitButton = document.getElementById('submit');
const hiddenElements = document.querySelectorAll('.hidden');


function getMet(type) {
    const speed = speedValue(speedInput);
    const t = type.toLowerCase();
    if (t === 'walking') return speed < 3 ? 2.0 : speed < 5 ? 2.8 : 3.5;
    if (t === 'running') return speed < 8 ? 6.0 : speed < 10 ? 8.0 : 10.0;
    if (t === 'biking') return speed < 16 ? 4.0 : speed < 20 ? 6.8 : 8.0;
    if (t === 'swimming') return speed < 2 ? 4.8 : speed < 4 ? 5.8 : 7.0;
    return 4.0;
}

function computeCal(w, m, d, s) {
    return (m * 3.5 * w / 200) * ((d / s) * 60);
}

const clicking = e => {
    e.preventDefault();
    const distance = distanceValue(distanceInput);
    const speed = speedValue(speedInput);
    const weight = weightValue(weightInput);
    const exercise = document.getElementById("exercise-type").textContent;
    const met = getMet(exercise);
    const calories = computeCal(weight, met, distance, speed);
    caloriesInput.textContent = `Calories Burned : ${calories.toFixed(2)}`;
};
<section id="section1" class="hidden">
        <div id="calculator-box">
            <h3 id="exercise-type">
                Walking
            </h3>
            <form>
                <label for="weight" class="dis2">Weight (kg)</label>
                <input id="weight" class="input" type="number" inputmode="numeric" min="0" max="180" step="any">
                <br>
                <label for="distance" class="dis2">Distance (km)</label>
                <input id="distance" class="input" type="number" inputmode="numeric" min="0" max="1000" step="any">
                <br>
                
                <label for="speed" class="dis2">Speed (km/h)</label>
                <input id="speed" class="input" type="number" min="0" max="100" inputmode="numeric" step="any">
                <br>
                <p id="Calories">Calories Burned : 0</p>
                <button id="submit" type="button" inputmode="numeric">Calculate</button>
            </form>
        </div>
    </section>

I’m pretty sure the main issue is related to the speed input, but I’ve noticed that the overall calculations feel off too. I’ve included a video in the link above that shows the bug in action.

Here’s what’s happening:
• When I increase the speed (for example, going from 11 to 12 km/h), the calories burned goes down.
• On the flip side, when I enter a very low speed, the calorie estimate becomes really high.

From what I understand, this might be because the duration is being calculated as distance ÷ speed, so a lower speed = longer duration = more calories burned. But it doesn’t feel accurate — especially when super low speeds cause calorie numbers that seem way too high.

I’m not sure if the formula is correct, or if I should be capping values or adjusting METs differently.

Please take a look if you can — I’d really appreciate the help. More details are explained in the video above. Thank you!

Retrieve all selected(not necessarily active) tabs in chrome extension

In each chrome window, there can be multiple selected tabs(by shift click), but there is one and only one active tab, which is generally the mostly recently selected one.

In chrome extension you can use chrome.tabs.onActivated.addListener((activeInfo) => {} or chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {} to get active tab(s).

The question is how to retrieve tabs that are selected on each window.

Trigger callback when N tab stops away from a target element (for smarter prefetching) in JavaScript

I’m building a JavaScript library called ForesightJS for smart prefetching. It currently predicts mouse movements and prefetches content accordingly. I now want to support keyboard users.

Goal:

Given a focusable (tabbable) element and a number N, I want to trigger a callback when the user tabs to an element that is N steps before the subscribed element.

Example:

Say there are 8 focusable elements. If the 6th element is the target and N = 2, then when the user focuses (tabs to) the 4th element, the callback for the 6th element should fire.

How can I detect and track tab navigation like this in the most performant way possible?

How to override a “shadow-root” style for a element that doesn’t have an ID or CLASS

Dose someone know how to hide or remove this “shadow-root” HTML div or toolbar element below? I tried somne JavaScript’s but they all were for div’s that have an ID or CLASS. If JavaScript is required for this then something in ES5 would be nice, if it’s possible.

I tried it also with CSS but it didn’t work. -_-

[style*="display: initial !important;forced-color-adjust: initial !important;"] {
  display: none !important;
}

Here is the HTML code that is getting inserted by an external JavaScript file that I try to hide or remove.

<div style="... display: initial !important;forced-color-adjust: initial !important;mask: initial !important;math-depth: initial !important;position: initial !important;position-anchor: initial !important; ...>
#shadow-root (open)
    <link rel="stylesheet" href="https://SomeCSS.url">
    <style>... .tg-container {position: fixed;}.tg-menu {position: absolute; bottom: 0; display: flex; flex-direction: column;}.tg-menu:not(.ft-multiple-buttons *) ...</style>
    <toolbar id="ft-floating-toolbar" class="tg-container tg-left" style="z-index: 2147483647; bottom: 50px; left: 10px;"><div class="tg-menu"><div class="tg-button-holder"></toolbar>
</div>

EDIT: This div has no child and it’s always added at the end of the “/body” tag and it no always added.

Middleware Validates Invalid ObjectId Locally (Returns 400), but Deployed Backend Throws 500 During Database Query [closed]

when i am trying to enter invalid objectId in frontend in a deployed env it is giving 500 internal server error with displaying not a valid Object ID which comes when querying through database but when i kept localhost as backendUrl and try to hit it without any changes it is working fine as expected as it is getting failed at middleware what might be the issue over here to show 500 instead of 4xx error. We have a middleware validation for all the fields and it is working fine when I am using localhost and working without any issues??

I have entered an invalid String which actually expects an ObjectId. In this case it should show invalid object Id and should give an 400 error but it is displaying 500 error.

How to make eslint catch ReferenceErrors

I use eslint from NodeJS to check my code and it seems not to catch ReferenceErrors. Here is a minimal example, mre.js:

console.log(obj);
let obj = 2;

When I run eslint, I get no warnings:

$ ./node_modules/.bin/eslint mre.js

I updated eslint and confirm it is the latest version (9.2.6):

$ npm update eslint
$ npm info eslint version           
9.26.0

How can I make eslint catch ReferenceErrors, or what is a linter that catches them?

setTransform visually incorrect for a reflected image (translated/rotated/scaled), but matrixTransform applied to the original coordinates works

My vanilla JS program has two canvases. The user draws arbitrary straight lines on an image on the first canvas, and pieces taken from splitting the canvas by the line are drawn on the second canvas, some of them reflected around the line (using reflectPiece). I draw the reflected points of the piece directly on the second canvas, then apply a reflection matrix transform (derived with getReflectionMatrix) so that I can rotate/scale the image appropriately, then draw the image clipped to the outline.

This works perfectly for most combinations that I have tried, but I have found a line that it will not work for and cannot work out why. It is as if the reflection is not applying (or doubling) or something, so the image is rotated to the wrong angle and its angle doesn’t align with the unmodified outline of the reflected points.

  1. In my example code, the unmodified outline after reflection is drawn
    in black and blue using two approaches – point for point
    from reflectPiece, and using DOMPoint.matrixTransform to
    transform the original points with the reflection matrix in order to show the
    matrix doesn’t work the same both times – and filled in with both
    yellow and blue (green). These are the intended points.
  2. Then I draw
    the reflected points with the reflection matrix applied as a
    transform in red, to show the result of doubling the reflection.
  3. Then I draw the image with the transform applied like I do in my
    main code, and the angle aligns with the double-rotated red piece, when it should
    align with the one that’s coloured in green.

I’m sure it’s something really basic and I feel silly asking, but I’ve been stuck for days somehow 🙁 Geometry is not my forte.

Broken:

Screenshot of broken shape

Working:

Screenshot of working shape

Here is my debug code:

<canvas id="canvas" width="800" height="800"></canvas>
<img src="debug.png" id="image" style="display: none">
<script>
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
const img = document.getElementById("image");

const intersects = [new DOMPoint(143.07549812764975, 58.35350167526056),
new DOMPoint(198.3825597334491, 8.86823602796649)];
const points = [
    new DOMPoint(198.38255973344914, 8.868236027966528),
    new DOMPoint(162.65825355141538, 359.09787638799855),
    new DOMPoint(112.9163540869709, 354.0240772523315),
    new DOMPoint(143.0754981276499, 58.3535016752607),
];
const line = { startX: 250.4616879421679, startY: -37.7288786850976, endX: 103.53831205783209, endY: 93.7288786850976 };

const reflected = reflectPiece(points, line);
const transform = getReflectionMatrix(line);
const mapped = mapTransform(points, transform);

const canvasTransform = new DOMMatrix().translateSelf(canvas.width/2, canvas.height/2);
const drawTransform = canvasTransform.multiply(transform);
ctx.setTransform(canvasTransform);

img.onload = () => {
    debug();
}

function debug() {
    drawMatrixTransformedPoints();
    drawReflectedWithTransform();
    drawReflectedPoints();
    drawImage();
}

function drawMatrixTransformedPoints() {
    ctx.strokeStyle = "black";
    tracePiecePath(mapped);
    ctx.stroke();
    ctx.fillStyle = "yellow";
    ctx.fill();
}

function drawReflectedPoints() {
    ctx.strokeStyle = "blue";
    tracePiecePath(reflected);
    ctx.stroke();
    ctx.globalAlpha = 0.25;
    ctx.fillStyle = "cyan";
    ctx.fill();
    ctx.globalAlpha = 1;
}

function drawReflectedWithTransform() {
    ctx.save();
    ctx.strokeStyle = "red";
    ctx.setTransform(drawTransform);
    tracePiecePath(reflected);
    ctx.stroke();
    ctx.restore();
}

function drawImage() {
    ctx.globalAlpha = 0.5;
    ctx.save();
    ctx.setTransform(drawTransform);
    ctx.drawImage(img, 0, 0);
    ctx.restore();
    ctx.globalAlpha = 1;
}

function tracePiecePath(points) {
    ctx.beginPath();
    const firstPoint = points[0];
    ctx.moveTo(firstPoint.x, firstPoint.y);
    points.slice(1).forEach(point => {
        ctx.lineTo(point.x, point.y);
    });
    ctx.closePath();
}

function getReflectionMatrix(line) {
    const matrix = new DOMMatrix();
    const origin = getMidlinePoint(...intersects);
    const angle = getAngleFromOrigin(line);
    const angleInDegrees = angle * 180 / Math.PI;
    matrix.translateSelf(origin.x, origin.y);
    matrix.rotateSelf(angleInDegrees);
    matrix.scaleSelf(1, -1);    
    matrix.rotateSelf(-angleInDegrees);
    matrix.translateSelf(-origin.x, -origin.y);
    return matrix;
}

function getMidlinePoint(pt1, pt2) {
    const x = (pt1.x + pt2.x)/2;
    const y = (pt1.y + pt2.y)/2;
    return new DOMPoint(x, y);
}

function getAngleFromOrigin(line) {
    const { startX, endX, startY, endY } = line;
    const dx = endX - startX;
    const dy = endY - startY;
    return Math.atan2(dy, dx);
}

function reflectPiece(points, line) {
    const normal = this.getNormalVector(line);
    const newPoints = [];
    for (let i = 0; i < points.length; i++) {
        newPoints.push(this.reflectPoint(line, points[i], normal));
    };
    return newPoints;
}

function getNormalVector(line) {
    const { startX, endX, startY, endY } = line;
    const dx = endX - startX;
    const dy = endY - startY;
    const len = Math.hypot(dx, dy);

    const nx = -dy / len;
    const ny = dx / len;
    return { nx, ny };
}
function reflectPoint(line, point, normal) {
    const { x, y } = point;
    const { startX, startY } = line;
    const { nx, ny } = normal;

    const vx = x - startX;
    const vy = y - startY;
    const dot = vx * nx + vy * ny;
    const rx = startX + vx - 2 * dot * nx;
    const ry = startY + vy - 2 * dot * ny;
    return new DOMPoint(rx, ry);
}

function mapTransform(points, m) {
    return points.map(point => point.matrixTransform(m));
}
</script>

Here is an example of a working shape (aligns with the green shape, not the red one):

const intersects = [new DOMPoint(256.8378378378378, 50),
new DOMPoint(258.18918918918916)];
const points = [new DOMPoint(369.29268292682923, 50),
new DOMPoint(256.83783783783787, 50),
new DOMPoint(258.1891891891892, 0),
new DOMPoint(316.8536585365853, 0)];
const line = { startX: 267.0952908723996, startY: -329.5257622787839, endX: 247.90470912760043, endY: 380.5257622787839 };

debug.png: debug.png

Thanks!

Boost Option on Admin/Dashboard [closed]

Issue: No option to stop, pause or terminate fulfillment on boosted videos and followers.
Explanation: Some customer who are not satisfied with their boosted videos or followers are requesting to immediately stop fulfillment

Acceptance Criteria: Provide option in Admin and/or User Dashboard to manually stop, pause, or terminate Boost Video and Boost Follower fulfillment.

TinyMCE 6.x Issue: Template Element Content Being Removed

TinyMCE 6.x Issue: Template Element Content Being Removed

Description

When using <template> elements in TinyMCE 6.x, the content (child elements) inside these templates is automatically removed from the DOM, unlike in TinyMCE 5.x where the content was preserved. This behavior affects conditional content management approaches that rely on template elements.

Steps to Reproduce

  1. Initialize TinyMCE 6.x editor
  2. Add HTML content containing a <template> element with children, for example:
<template class="component">
   <div>i am child</div>
</template>
  1. Observe that the template’s inner content is removed from the DOM

Expected Behavior

Template elements should preserve their inner content (DocumentFragment) just as they did in TinyMCE 5.x.

Actual Behavior

In TinyMCE 6.x, the inner content of the template element is completely removed. When inspecting the DOM, the template element exists but contains no children.

Workarounds Attempted

  1. Modified schema configuration:
custom_elements: 'template',
non_empty_elements: 'td,th,iframe,video,audio,object,script,template,style,textarea',
valid_children: '+p[template],+div[template],+tr[template],+tbody[template],+td[template]',
  1. Disabled HTML validation:
schema: 'html5',  // instead of html5-strict
verify_html: false,
validate: false,
cleanup: false,
  1. Added content preservation settings:
preserve_cdata: true,
raw: true,
forced_root_block: false,

None of these configurations fully resolved the issue.

Environment

  • TinyMCE version: 6.x (issue does not exist in 5.x)
  • Browser: Chrome, Firefox, Safari (all show the same behavior)
  • Implementation: Vue.js (but the issue appears to be with TinyMCE core)

Additional Information

This appears to be a change in how TinyMCE 6.x handles non-standard HTML elements or shadow DOM components. In our application, we use template elements for conditional visibility, and this change significantly impacts our content management workflow.

Why does React `event.currentTarget` become null inside setState only on subsequent clicks? [duplicate]

I have a simple React functional component (AccordionItem) with a button that updates its state on click. This component is rendered directly on a blank page. Inside the onClick handler, I need to access event.currentTarget within the setState callback.

On the first click, event.currentTarget logs the correct button element. However, on subsequent clicks, it becomes null inside the setState callback.

Here’s the AccordionItem component code:

import { useState } from "react";

export function AccordionItem() {
  const [isOpen, setIsOpen] = useState(false);
  const handleOnClick = (
    event: React.MouseEvent<HTMLButtonElement, MouseEvent>
  ) => {
    console.log("Outside: ", event.currentTarget);
    setIsOpen((state) => {
      console.log("Inside: ", event.currentTarget);
      return !state;
    });
  };

  return (
    <button type="button" onClick={handleOnClick}>
      Click
    </button>
  );
}

And here’s how it’s rendered on the parent (just a blank page):

import { AccordionItem } from "../components/accordion-item";

export default function Page() {
  return <AccordionItem />;
}

Browser console logs

I have found a workaround by storing event.currentTarget in a local variable before calling setState, which works correctly.

  const handleOnClick = (
    event: React.MouseEvent<HTMLButtonElement, MouseEvent>
  ) => {
    const storedEvent = { ...event };
    setIsOpen((state) => {
      console.log(storedEvent);
      return !state;
    });
  };

However, I am still trying to understand why the original event.currentTarget becomes null.