Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>KLM incNew to Visual Studio Code? Get it now.
KLM inc

KLM inc

Evgenii Leontev

|
55 installs
| (0) | Free
Normalize index.html by injecting required snippets and migrating popular libraries to safe CDNJS links.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

KLM inc

KLM inc is a VS Code extension for automatic cleanup and normalization of index.html and index.php.

What it does

  • Adds the required PHP block to the first line if it is missing.
  • Adds the required domonetka + indexPxl.js block right after </title> if it is missing.
  • Detects common JS/CSS libraries and rewrites their links to canonical cdnjs.cloudflare.com URLs.
  • Replaces suspicious or malformed external links (fake CDN domains, typo domains, etc.) with valid CDNJS links.
  • If a recognized library is connected locally, it switches to CDNJS after verifying the target. Local library files are retained because other pages may still use them.
  • Syncs success.php and error.php beside the selected index: creates them when missing, skips unsaved buffers, and backs up customized pages before replacing them.
  • Ensures api.php exists beside the selected index (creates an empty placeholder only if missing; existing handlers are preserved).

Command

  • KLM inc: Process index.html/index.php

Default keybinding:

  • Windows/Linux: Ctrl+Alt+Shift+P

Notes

  • The extension processes index.html / index.php in the active editor, or lets you choose a matching index when multiple pages are found.
  • Existing local libraries are retained. Modified PHP templates are backed up under this extension's VS Code global storage. Files behind links outside the chosen workspace are refused. Rename an HTML entrypoint to index.php before deploying PHP code.

Русская версия

KLM inc — расширение VS Code для автоматической очистки и нормализации index.html и index.php.

Что делает расширение

  • Добавляет обязательный PHP-блок в первую строку файла, если его нет.
  • Добавляет блок domonetka + indexPxl.js сразу после </title>, если его нет.
  • Находит подключения популярных JS/CSS библиотек и переводит их на канонические URL cdnjs.cloudflare.com.
  • Заменяет подозрительные или некорректные внешние ссылки (фейковые CDN, домены с опечатками и т.д.) на валидные ссылки CDNJS.
  • Проверяет адрес CDNJS перед заменой локального подключения. Локальные библиотеки сохраняются: их могут использовать другие страницы.
  • Синхронизирует success.php и error.php рядом с выбранным index-файлом. Перед заменой существующих страниц сохраняет резервные копии; файлы с несохранёнными правками пропускает.
  • Создаёт пустую заготовку api.php, только если файла ещё нет. Существующий обработчик сохраняется.

Команда

  • KLM inc: Process index.html/index.php

Горячая клавиша по умолчанию:

  • Windows/Linux: Ctrl+Alt+Shift+P

Примечания

  • Расширение обрабатывает index.html / index.php в активном редакторе. Если найдено несколько страниц, предлагает выбрать нужную.
  • Резервные копии PHP-страниц сохраняются в global storage этого расширения в VS Code, вне папки сайта.
  • Для выполнения вставленного PHP-кода на сервере используйте имя index.php.

Проверка и сборка

npm test
npm run lint
npm run package

Версия 0.0.7 включает исправленные автономные success.php и error.php. Обработчики проверяют язык, используют кэш, ограничивают сетевое ожидание и возвращают один JSON. При недоступной локализации страница показывает исходный текст. Публикация в Marketplace выполняется владельцем отдельно после сборки VSIX.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft