PageSourceSearch

https://carental.ru/jss/webmcp-origin-trial.js?v=20260619-1

js carental.ru collected 2026-10-08 09:32:11 UTC 2,096 bytes, 32 lines download raw bytes

1/*!
2 * webmcp-origin-trial.js — активация WebMCP origin-trial (third-party токен).
3 * @version 20260619-1
4 *
5 * Токен зарегистрирован как THIRD-PARTY (payload isThirdParty:true) с Match
6 * Sub-Domains (isSubdomain:true) для https://carental.ru — покрывает корень и
7 * все городские сабдомены (sochi/anapa/...).
8 *
9 * По докам Chrome (developer.chrome.com/docs/web-platform/origin-trials, раздел
10 * "Provide a token programmatically") third-party токен НЕ активируется через
11 * статический <meta>/inline/HTTP-header — ТОЛЬКО программной инъекцией
12 * document.createElement('meta') ИЗ ВНЕШНЕГО JS-файла, подключённого <script src>.
13 * "the origin registered for the token must match the src of a <script element>".
14 *
15 * Этот файл — тот самый внешний JS. Грузится БЕЗ defer, рано в <head>, ДО
16 * /jss/webmcp.js (defer), чтобы document.modelContext успел активироваться к
17 * моменту регистрации инструментов в webmcp.js.
18 */
19(function () {
20    'use strict';
21    try {
22        if (document.querySelector('meta[http-equiv="origin-trial"][data-carental-webmcp]')) {
23            return; // idempotent — повторная загрузка не дублирует
24        }
25        var TOKEN = 'A8MqGX6kaVNThKoaZ5Y+8oAtzE1GPgX5IjbYDp8jFxK4/xb1wZpXbTMRPpDFUy3HT9zXwMq+UF3FAXNPmiwXLAoAAAByeyJvcmlnaW4iOiJodHRwczovL2NhcmVudGFsLnJ1OjQ0MyIsImZlYXR1cmUiOiJXZWJNQ1AiLCJleHBpcnkiOjE3OTQ4NzM2MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9';
26        var meta = document.createElement('meta');
27        meta.setAttribute('http-equiv', 'origin-trial');
28        meta.setAttribute('content', TOKEN);
29        meta.setAttribute('data-carental-webmcp', '1');
30        (document.head || document.documentElement).appendChild(meta);
31    } catch (e) { /* silent — progressive enhancement, не роняем сайт */ }
32})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.