 
  
   
  
  {
  "manifest_version": 3,
  "name": "Request Header Logger",
  "version": "1.0",
  "permissions": [
    "webRequest"
  ],
  "background": {
    "service_worker": "background.js"
  },
  "host_permissions": [
    "*://*/*"
  ]
}host_permissions лучше указать только нужные хостыchrome.webRequest.onSendHeaders.addListener(
    function(details) {
        console.log("URL: " + details.url); // Тут будет url запроса
        console.log("Request Headers: ", details.requestHeaders); // Тут будут заголовки запросов
    },
    { urls: ["<all_urls>"] },
    ["extraHeaders", "requestHeaders"]
);class Typewriter {
  constructor(element, texts, speed) {
    this.element = element;
    this.texts = texts;
    this.speed = speed;
    this.index = 0;
    this.textIndex = 0;
  }
  start() {
    this.type();
  }
  type() {
    if (this.index < this.texts[this.textIndex].length) {
      this.element.innerHTML += this.texts[this.textIndex].charAt(this.index);
      this.index++;
      setTimeout(() => this.type(), this.speed);
    } else {
      this.index = 0;
      this.textIndex = (this.textIndex + 1) % this.texts.length;
      this.element.innerHTML = "";
      setTimeout(() => this.type(), this.speed);
    }
  }
}
const qualityElement = document.getElementById("quality");
const TEXTS = ["Креативность ", "Эффективность ", "Индивидуальность "];
const SPEED = 85;
const typewriter = new Typewriter(qualityElement, TEXTS, SPEED);
typewriter.start();Какого его не может получить «fetch»?Через браузер вы обращаетесь от домена эндпоинта, от которого хотите получить информацию.
const proxyUrl = 'https://api.allorigins.win/get?url=';
const targetUrl = 'https://rutube.ru/api/video/37daa4e656174d04db06c5fca7548751';
fetch(proxyUrl + encodeURIComponent(targetUrl))
    .then(response => {
        if (!response.ok) {
            throw new Error('Network response was not ok');
        }
        return response.json();
    })
    .then(data => {
        // данные могут быть внутри data.contents
        console.log('Data retrieved:', JSON.parse(data.contents));
    })
    .catch(error => {
        console.error('There was a problem with the fetch operation:', error);
    });