HTML How do I get the value from a button without knowing it’s id or name

I am trying to build a database admin panel for a project and I want to be able to edit a specific entry by clicking on a button on the specific table row. I need a way to pass the value of the button, which is set to the id of the entry, to a php script redirect page but also to the same page because when you would press the button a prefilled form woukd pop up. Any way to do that? This is my first ever HTML/Javascript/PHP project.

I tried saving the value of the button in a global js variable and saving it each time the pop-up is opened. I used a button with console log and it’s saved just fine, but for whatever reason when I submit the form the posted value in the redirect script comes out as undefined. Cannot post code right now but will post whenever I can.

Java Script display data fetched by API in containers

Hi I am a student and trying to create a webpage with JavaScript that uses the SpaceX API. The initial fetch request creates a card with a mission name and when the card is clicked it displays additional mission data. The issue I am having is that the additional data is displaying to the left of the mission name inside the card. I am trying to get it to display underneath the mission name. enter image description here My codeenter image description herecontainer with data

I tried creating seperate containers to get the desired result however it is not working

Bingo card box changing sizes when selected

I’m trying to create a bingo card. I’d like for there to be a couple color options for people to use when selecting a box. However when choosing a color and selecting a box. This changes the box sizing and quickly offsets my whole bingo card.

bingo boxes sized differently

What do I need to do to make sure that only the background color of the selected box changes and not the sizing of it?

I’ve tinkered with this code, but can’t seem to stop the sizing from changing. Ideally only the background color changes matching whatever color the person playing chooses.

var selectedColor = "";
function generateCard() {
  var card = document.getElementById("bingoCard");
  card.innerHTML = ""; // Clear previous card
  shuffleArray(words);
  var index = 0;
  for (var i = 0; i < 5; i++) {
    var row = card.insertRow();
    for (var j = 0; j < 5; j++) {
      var cell = row.insertCell();
      cell.textContent = words[index++];
      cell.onclick = markNumber;
      if (cell.classList.contains("marked") && selectedColor) {
        cell.classList.add(selectedColor);
      }
    }
  }
}
function shuffleArray(array) {
  for (var i = array.length - 1; i > 0; i--) {
    var j = Math.floor(Math.random() * (i + 1));
    var temp = array[i];
    array[i] = array[j];
    array[j] = temp;
  }
}
function markNumber() {
  if (!this.classList.contains("marked")) {
    this.classList.add("marked");
    if (selectedColor) {
      this.classList.add(selectedColor);
    }
  } else {
    this.classList.remove("marked");
    if (selectedColor) {
      this.classList.remove(selectedColor);
    }
  }
}
function changeColor(color) {
  selectedColor = color;
}

Event handing issue in react

import AppSelect from '@/components/form-fields/AppSelect';
import {
  Box,
  Button,
  CircularProgress,
  Divider,
  List,
  ListItemButton,
  ListItemIcon,
  ListItemText,
  Stack,
  Typography,
  useTheme,
} from '@mui/material';
import React, { useEffect } from 'react';
import { BlobProvider, PDFDownloadLink } from '@react-pdf/renderer';
import Iconify from '@/components/iconify';
import PaySlipPDF from './paySlipPDF';
import useGet from '@/hooks/useGet';
import { useForm } from 'react-hook-form';
import { useParams } from 'react-router-dom';
import { PAYSTRUCTURE_PAYROLL_LIST_ENDPOINT } from '@/constants/my-company/employee-directory';
import useUserStore from '@/store/user.store';

type PayRoll = {
  year: string;
  month: string;
  monthText: string;
  payrollId: string;
};

const Payslips = () => {
  const theme = useTheme();
  const [selectedIndex, setSelectedIndex] = React.useState(1);
  const [payrollId, setPayrollId] = React.useState('');
  const [list, setlist] = React.useState<PayRoll[] | undefined>([]);
  const { control, watch } = useForm();
  const user = useUserStore((state) => state.user);
  // const {id} = useParams();
  const { data } = useGet<any>(
    PAYSTRUCTURE_PAYROLL_LIST_ENDPOINT (user?.Employee?.id), ['getPayrunListForEmp']
  );

  
  // const options = [...new Set(data?.map((each: { year: any; }) => each.year))].map((each) => ({
  //   label: each,
  //   value: each,
  // }));


  // const year = watch('year');
  // useEffect(() => {
  //   if (data) {
  //     setlist(data?.filter((each: { year: any; }) => each.year === year));
  //   }
  // }, [year, data]);
  
  const options = [...new Set(data?.map((each:any) => each.year))].map((each) => ({
    label: each,
    value: each,
  }));

  const year = watch('year');
  useEffect(() => {
    setlist(data?.filter((each:any) => each.year == year));
  }, [year, data, payrollId]);
  const handleListItemClick = (index: number, id: string) => {
    console.log('Clicked index:', index);
    console.log('Clicked payrollId:', id);
    setSelectedIndex(index);
    setPayrollId(id);
  };
  
  
  // Add your custom styles for the header box
  const headerStyles = {
    display: 'flex',
    flexDirection: 'row',
    width: '70%',
    justifyContent: 'space-between',
    alignItems: 'center',
    padding: theme.spacing(2),
    backgroundColor: '#4A5363',
    color: theme.palette.primary.contrastText,
  };
  // console.log('Data:', data);
  // console.log('Options:', options);
  // console.log('List:', list);
  // console.log('Mapped Years:', data?.map((each: { year: any; }) => each.year));
  return (
    <Stack
      sx={{
        display: 'flex',
        flexDirection: 'row',
        margin: 2,
        gap: 2,
        flexWrap: 'wrap',
        height: '100%',

        [theme.breakpoints.down('sm')]: {
          flexDirection: 'column',
        },
      }}
    >
      <Stack
        direction='column'
        sx={{
          width: '250px',
          [theme.breakpoints.down('sm')]: {
            width: '100%',
          },
        }}
        gap={2}
      >
        <AppSelect control={control} name='year' options={options} />
        <Box component='span' sx={{ bgcolor: 'background.paper', flex: 1 }}>
          <List component='nav' aria-label='main mailbox folders'>
            {list?.map((each, idx) => (
              <ListItemButton
                selected={selectedIndex === idx}
                onClick={(event) => handleListItemClick(idx, each.payrollId)}
              >
                <ListItemText primary={each.monthText} />
              </ListItemButton>
            ))}
          </List>
        </Box>
      </Stack>
      <Box sx={{ flex: 1 }}>
        {payrollId ? (
          <PaySlipPDF id={payrollId} />
        ) : (
          <Typography variant='body2'>Select Year and Month </Typography>
        )}
      </Box>
    </Stack>
  );
};

export default Payslips;

From this code there is component AppSelect which is a reusable component on this it have option this option is a value which fetches the value from api and it is mapped in array value , if i select this option it shows years like 2024,2025 which is fetched from api and if i select one of the year it will display the months like jan, feb and march in a list , and shows it in listitembutton everything okay but whenever i click first month like jan it fetched data from api and display payslip pdf in box in same page in first load of the page, aftr i select feb it does not fetches the data like same for all month, i need to fetch data for all month when i click it in first load of page please give me the solution

 const handleListItemClick = (index: number, id: string) => {
    setSelectedIndex(index);
    if (payrollId !== id) {
      setPayrollId(id);
    } else {
      // Reset payrollId if the same month is selected again
      setPayrollId('');
    }
  };

i tried this logic but in this logic payrollid is resetted after when i click each month for three time then only it fetches data so i don’t need this behaviour

TypeError: Cannot read properties of undefined (reading ‘MessageAttachment’) [duplicate]

I’m a beginner to discord.js, currently I’m trying to develop a bot that will listen to a folder and send any files that are being added to the specific discord server’s specific channel. I’m getting this error when a new file is being added/removed from the folder, I don’t get what’s wrong.
error:

            const attachment = new Discord.MessageAttachment(`${folderPath}/${filename}`);
                                           ^

TypeError: Cannot read properties of undefined (reading 'MessageAttachment')
    at FSWatcher.<anonymous> (C:xampphtdocsxdddbot.js:24:44)
    at FSWatcher.emit (node:events:519:28)
    at FSWatcher._handle.onchange (node:internal/fs/watchers:215:12)

code:

const { Client, IntentsBitField, Discord, MessageAttachment, } = require('discord.js');
const fs = require('fs');

const client = new Client({
    intents: [
        IntentsBitField.Flags.Guilds,
        IntentsBitField.Flags.GuildMembers,
        IntentsBitField.Flags.GuildMessages,
        IntentsBitField.Flags.MessageContent,
    ]
});

const serverId = 'nuhuh';
const channelId = 'nuhuh';
const folderPath = 'uploadedVideos';

client.on('ready', () => {
    console.log('The bot is ready');
    
    // Set up file system watcher
    fs.watch(folderPath, (eventType, filename) => {
        if (eventType === 'rename' && filename) {
            // Send the file to Discord
            const attachment = new Discord.MessageAttachment(`${folderPath}/${filename}`);
            const channel = client.guilds.cache.get(serverId).channels.cache.get(channelId);
            if (channel) {
                channel.send(attachment)
                    .then(() => console.log('File sent to Discord'))
                    .catch(console.error);
            } else {
                console.error('Channel not found.');
            }
        }
    });
});

client.login("nuhuh");

please help!

I added messageattachment to const { Client, IntentsBitField, Discord, MessageAttachment, } = require(‘discord.js’); but it’s no help

Words to numbers

I am trying to take the numbers on a PHP data page and convert them to their word form through JavasScript onclick. When I console.log the result of each if statement- its doing what I am asking it to do in the background.. But I cant get it to return as a unit or display on the page. Any suggestions?

function trans(){
    let n = document.body.innerText;
    let match = n.match(/(d+)/g);
    if (match.text = "0")
    console.log (match.toString().replace(/0/g,'zero'));
    if (match.text = 1)
    console.log (match.toString().replace(/1/g,'one'));
    if (match.text = 2)
    console.log (match.toString().replace(/2/g,'two'));
    if (match.text = 3)
    console.log (match.toString().replace(/3/g,'three'));
    if (match.text = 4)
    console.log (match.toString().replace(/4/g,'four'));
    if (match.text = 5)
    console.log (match.toString().replace(/5/g,'five'));
    if (match.text = 6)
    console.log (match.toString().replace(/6/g,'six'));
    if (match.text = 7)
    console.log (match.toString().replace(/7/g,'seven'));
    if (match.text = 8)
    console.log (match.toString().replace(/8/g,'eight'));
    if (match.text = 9)
    console.log (match.toString().replace(/6/g,'nine'));}

Chrome Extension – Resume execution after Refreshing the page, from refresh was triggered – How to

I have this chrome extension, its contentScript.js triggers a refresh while execution. When the page is refreshed, execution ceases and doesn’t resume.
I want it to resume from where it caused the refresh page.

This causes the Refresh.

 const nextItem = selectedItem.nextElementSibling;
      if (nextItem) {
        nextItem.click();
      } else {
        console.log("Next item not found.");
        break;
      }
      await new Promise((resolve) => setTimeout(resolve, 3000));}

I want to resume execution from the very next line.

I just don’t understand how to do it. I have tried different resources but no luck.
Please help me, I am really new to this.

NestJS deployment on vercel having issue with swagger

I was following these two tutorials

to make deployments to Vercel but instead of using the vercel cli to deploy I used the UI in vercel instead but after deployment I kept on seeing this error in deployment log

src/common/configs/swagger.ts(10,7): error TS2349: This expression is not callable.
Type 'typeof expressBasicAuth' has no call signatures.

That error is actually calling my swagger setup which looks like

import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import * as basicAuth from 'express-basic-auth';

const SwaggerSetup = (app) => {
  const SWAGGER_ENVS = ['local', 'dev', 'staging'];

  if (SWAGGER_ENVS.includes(process.env.NODE_ENV)) {
    app.use(
      ['/api', '/api-json'],
      basicAuth({
        challenge: true,
        users: {
          [process.env.SWAGGER_USER]: process.env.SWAGGER_PASSWORD,
        },
      }),
    );

    const options = new DocumentBuilder()
      .setTitle('Title')
      .setDescription('Description')
      .setVersion('1.0')
      .build();

    const document = SwaggerModule.createDocument(app, options);

    SwaggerModule.setup('api', app, document, {
      swaggerOptions: {
        docExpansion: 'none',
      },
    });
  }
};

export default SwaggerSetup;

I thought it might be TS version issue and so, which I updated and changed. Things are still running fine locally and swagger working fine locally too.

Not too sure where else I can try to look into to solve this issue.

Thanks you for in advance for any suggestions.

Convert hash method from Swift to Javascript

I have this hashing method in Swift and need to produce the same result in Javascript. (BTW I’m working with legacy code which doesn’t require security and am aware that sha1 is ill-advised… but that’s where things are at the moment.):

import Foundation
import CommonCrypto

extension String {
  func sha1() -> String {
    let saltedString = "salt" + self + "salt"
    let data = Data(saltedString.utf8)
    var digest = [UInt8](repeating: 0, count:Int(CC_SHA1_DIGEST_LENGTH))
    data.withUnsafeBytes {
      _ = CC_SHA1($0.baseAddress, CC_LONG(data.count), &digest)
    }
    let hexBytes = digest.map { String(format: "%02hhx", $0) }
    return hexBytes.joined()
  }
}

This produces a different result:

  const saltedString = 'salt' + password + 'salt';
  const hash = crypto.createHash('sha1').update(saltedString).digest('hex');

I’m trying to convert an app from iOS to React Native and would consider bridging Swift/ObjC to RN but want to keep this in Javascript for multiplatform.
I’d really appreciate some guidance on how to produce matching results. Thanks!!

How would I use JavaScript to redirect network requests?

If I had a website processing information or sending links as https://example.com, how would I change all network requests as https://example.org? This includes ANY information being taken by the website.

I attempted to find the attributes href and src using getAttribute but still missed some requests. how would I find a way to do this?
My current code is this:

<!DOCTYPE html>
<html>
    <head>
        <title>NoGuardian</title>
        <style>
            body {
                margin: 0;
            }
            iframe#page {
                border: 0;
                width: 100%;
                height: 100vh;
                position: fixed;
            }
        </style>
    </head>
    <body>
        <iframe id="page"></iframe>
        <script>
            `use strict`;
            if (window.location.search.charAt(window.location.search.length - 1) === `/`) {
                window.location.search = window.location.search.slice(0, window.location.search.length - 1);
            }
            if (window.location.search.slice(1, 9) == `https://`) {
                window.location.search = window.location.search.slice(9);
            }
            else if (window.location.search.slice(1, 8) == `http://`) {
                window.location.search = window.location.search.slice(8);
            }
            fetch(`https://api.codetabs.com/v1/proxy?quest=${window.location.search.slice(1)}`).then((response) => response.text()).then((text) => {
                const iframe = document.getElementById(`page`);
                iframe.setAttribute(`srcdoc`, text);
                iframe.addEventListener(`load`, function() {
                    for (let elements = 0; elements < iframe.contentWindow.document.getElementsByTagName(`*`).length; elements++) {
                        if (iframe.contentWindow.document.getElementsByTagName(`*`)[elements].getAttribute(`src`) != null) {
                            if (iframe.contentWindow.document.getElementsByTagName(`*`)[elements].getAttribute(`src`).slice(0, 1) == `/`) {
                                iframe.contentWindow.document.getElementsByTagName(`*`)[elements].setAttribute(`src`, `${window.location.search.slice(1)}${iframe.contentWindow.document.getElementsByTagName(`*`)[elements].getAttribute(`src`)}`);
                            }
                            else if (iframe.contentWindow.document.getElementsByTagName(`*`)[elements].getAttribute(`src`).slice(0, 2) == `./`) {
                                iframe.contentWindow.document.getElementsByTagName(`*`)[elements].setAttribute(`src`, `${window.location.search.slice(1)}${iframe.contentWindow.document.getElementsByTagName(`*`)[elements].getAttribute(`src`).slice(1, iframe.contentWindow.document.getElementsByTagName(`*`)[elements].getAttribute(`src`).length - 1)}`);
                            }
                            // console.log(`href: ${iframe.contentWindow.document.getElementsByTagName(`*`)[elements].getAttribute(`src`)}`)
                        }
                        if (iframe.contentWindow.document.getElementsByTagName(`*`)[elements].getAttribute(`href`) != null) {
                            // console.log(`src: ${iframe.contentWindow.document.getElementsByTagName(`*`)[elements].getAttribute(`href`)}`)
                        }
                    }
                });
            });
        </script>
    </body>
</html>

I am also detecting href with the code but removed the section to minimize it.

FirebaseError: Firebase: Error (auth/popup-closed-by-user) [duplicate]

I’m coding a Pixel Wars for me and my friends. So I’m trying to implement an account system there so that me and them can each have our own nickname, …
So I use Google’s Firebase authentication to create an identification/connection system.
After coding it, I wanted to make a first attempt to upload to my website with the Hostinger platform. So I tried to log into my account to see if everything worked, however the following error occurred:

`FirebaseError: Firebase: Error (auth/popup-closed-by-user).

FirebaseError errors.ts:76
  create errors.ts:134
  createErrorInternal assert.ts:161
  _createError assert.ts:86
  pollId popup.ts:298
  setTimeout handler*poll popup.ts:297
  setTimeout handler*poll popup.ts:203
  pollUserCancellation popup.ts:203
  onExecution popup.ts:266
  execute abstract_popup_redirect_operation.ts:77
  execute abstract_popup_redirect_operation.ts:72
  executeNotNull popup.ts:224
  signInWithPopup popup.ts:133
  <anonymous> auth.js:21
  EventListener.handleEvent* auth.js:20
auth.js:32:17
  <anonymous> https://****.fr/pixel-war/auth.js:32
  (Async: promise callback)
  <anonymous> https://****.fr/pixel-war/auth.js:28
  (Async: EventListener.handleEvent)
  <anonymous> https://****.fr/pixel-war/auth.js:20`

I have no idea where this could come from. I tried to add my domain name to the authorized domains, then I did some research but I couldn’t find anyone who could solve my problem.
Here is my problem briefly described, if you need more information in order to solve my problem, do not hesitate to ask me because being a beginner with Firebase, I don’t really know what to provide.
Thanks in advance to whoever finds the solution!

I tried changing the allowed domains settings on Firebase, I tried changing the OAUTH credentials in case it was wrong. I tried to find videos explaining the error and what changes to the code or Firebase tool. However, research on this topic is limited and therefore difficult to resolve.

Event listener delay when key held

Ive made a fairly simple movement script for a web based game I am making and I noticed that when a key is held down, it runs the movements once, waits a while, then starts moving continuously. I assume this is a thing that’s done by browsers to stop users from accidentally typing thousands of letters when holding a key down for too long, but is there any way to disable this?

This is a method used in my “Game” class which has all the functions needed for the game too run

movement(player) {
    let movements = {
        up: false,
        down: false,
        left: false,
        right: false,
        speed: 0,
        maxSpeed: 10,
        lastMove: null
    }

    function controls(e) {
        const key = e.key;
        if (key == "w") {
            e.preventDefault();
            movements.up = true;
        }
        if (key == "s") {
            e.preventDefault();
            movements.down = true;
        }
        if (key == "a") {
            e.preventDefault();
            movements.left = true;
        }
        if (key == "d") {
            e.preventDefault();
            movements.right = true;
        }
    }

    function movement(x) {
        let direction = null;

        if (movements.up) direction = "up";
        else if (movements.down) direction = "down";
        else if (movements.left) direction = "left";
        else if (movements.right) direction = "right";

        if (direction) {
            if (direction == "up" || direction == "down") {
                player.src = `${x.data.entities.player.image}${direction}.png`;
                player.style.top = `${parseInt(player.style.top) + (direction == "up" ? -1 : 1) * movements.speed}px`;
            } else {
                player.src = `${x.data.entities.player.image}${direction}.png`;
                player.style.left = `${parseInt(player.style.left) + (direction == "left" ? -1 : 1) * movements.speed}px`;
            }
            movements.lastMove = direction;
        }

        if (direction && movements.speed < movements.maxSpeed) {
            movements.speed++;
        }

        if (direction) {
            movements.up = false;
            movements.down = false;
            movements.left = false;
            movements.right = false;
        }

        requestAnimationFrame(() => movement(x));
    }


    requestAnimationFrame(() => movement(this));
    document.addEventListener("keydown", (e) => {
        controls(e);
    });
}

Customize the “ghost” element with VueDraggable

I use the following library: https://github.com/SortableJS/Sortable

I have 2 lists where I can dragg one element to the other list. But When i dragg the item its a clone of the icon.
What I am trying to do is while you move the item between the list. Instead of the Icon I want a customize element to be shown as “Ghost elememt”.

Within sortableJS you something called “ghostClass” which works but it only adds the custom class.
But now I want also to customize the ghost Element.

Is there a way to accomplish this?

Translate my PDF with “puppeteer” in NodeJs

My main goal is to translate a single PDF page in the free translation service in Google Translate with puppeteer in nodejs.

Here’s my code:

const puppeteer = require('puppeteer');

(async () => {
  // Launch a headless browser
  const browser = await puppeteer.launch();

  // Open a new page
  const page = await browser.newPage();

  // Replace the URL below with the URL of the PDF you want to translate
  const pdfUrl = 'https://www.cbu.edu/wp-content/uploads/2020/05/2019-20-ece-computersystems-cs.pdf';

  // Navigate to the PDF translation page
  await page.goto(`https://translate.google.com/translate?hl=en&sl=fr&u=${encodeURIComponent(pdfUrl)}`);

  // Wait for the translation page to load
  await page.waitForSelector('#contentframe iframe');

  // Get the source URL of the translated content iframe
  const iframeSrc = await page.evaluate(() => {
    return document.querySelector('#contentframe iframe').src;
  });

  console.log('Found iframe:', iframeSrc);

  // Navigate to the translated content iframe
  await page.goto(iframeSrc);

  // Wait for translation to complete
  await page.waitForTimeout(5000); // Adjust the timeout as needed based on the translation complexity

  // Print the translated content to PDF
  await page.pdf({ path: '/tmp/translated_pdf.pdf' });

  console.log('PDF translation completed successfully.');

  // Close the browser
  await browser.close();
})();

Here are the errors it gave me:

richardsonoge@richardsonoge-blooglet:/opt/lampp/htdocs/pdf_translator$ node translate_pdf.js
/opt/lampp/htdocs/pdf_translator/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:50       
            this.#timeoutError = new Errors_js_1.TimeoutError(`Waiting failed: ${options.timeout}ms exceeded`);                                                                                                       
                                 ^                                                   

TimeoutError: Waiting for selector `#contentframe iframe` failed: Waiting failed: 30000ms exceeded
    at new WaitTask (/opt/lampp/htdocs/pdf_translator/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:50:34)                                                                           
    at IsolatedWorld.waitForFunction (/opt/lampp/htdocs/pdf_translator/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Realm.js:25:26)                                                                              
    at PQueryHandler.waitFor (/opt/lampp/htdocs/pdf_translator/node_modules/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.js:170:95)                                                  
    at runNextTicks (node:internal/process/task_queues:60:5)       
    at process.processImmediate (node:internal/timers:442:9)                              
    at async CdpFrame.waitForSelector (/opt/lampp/htdocs/pdf_translator/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:468:21)                                             
    at async CdpPage.waitForSelector (/opt/lampp/htdocs/pdf_translator/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:1309:20)
    at async /opt/lampp/htdocs/pdf_translator/translate_pdf.js:17:3    

Node.js v18.13.0                                
richardsonoge@richardsonoge-blooglet:/opt/lampp/htdocs/pdf_translator$

How can I fix them and make this code work?

To establish communication between a TypeScript React app and a Chrome extension

I have a Chrome extension. When I send a ‘start’ event from a React app (created by Vite TypeScript), the extension’s popup should display ‘activated’. Similarly, when I send a ‘stop’ signal, it should show ‘deactivated’.

import React from 'react';

interface Message {
  action: string;
}

class App extends React.Component {
  startExtension = () => {
    // Send message to activate extension
    chrome.runtime.sendMessage({ action: 'activate' } as Message);
  };

  stopExtension = () => {
    // Send message to deactivate extension
    chrome.runtime.sendMessage({ action: 'deactivate' } as Message);
  };

  render() {
    return (
      <div>
        <button onClick={this.startExtension}>Start</button>
        <button onClick={this.stopExtension}>Stop</button>
      </div>
    );
  }
}

export default App;`

getting this error

chrome VM8038:1 Chrome extension context not found. eval @ VM8038:1