
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
table-of-content
Advanced tools
Table of Contents Generator is a JavaScript package that creates a floating table of contents (TOC) button and panel for web pages.
(Original Vietnamese below)
Table of Contents Generator is a JavaScript package that creates a floating table of contents (TOC) button and panel for web pages. It automatically detects headings (H2, H3, H4) and generates a clickable TOC, enhancing navigation for long content.
To install, use npm:
npm install table-of-content
No additional dependencies are required beyond a modern browser.
– Generate a floating table of contents based on page headings.
– Show, hide the TOC button based on content visibility.
– Provide an interactive TOC panel that closes when clicking outside.
Include the package: Add the script to your HTML or import it in your JavaScript project.
Automatic activation: The TOC button appears when scrolling over content with the .prose
class and generates a TOC from headings.
Manual control (optional): Use initTableOfContents()
to start manually or destroy()
to remove the TOC.
Example usage in HTML:
<script src="node_modules/table-of-content/index.js"></script>
Example usage in JavaScript:
const { initTableOfContents } = require('table-of-content');
initTableOfContents();
toc.destroy();
– Email: info@nhavantuonglai.com.
– Website: nhavantuonglai.com.
If you have any questions or suggestions, feel free to reach out for the fastest support.
Don’t forget to star this repository if you find it useful.
Trình tạo mục lục là một gói JavaScript tạo ra một nút và bảng mục lục (TOC) nổi cho các trang web. Nó tự động phát hiện các tiêu đề (H2, H3, H4) và tạo ra một TOC có thể nhấp, cải thiện điều hướng cho nội dung dài.
Để cài đặt, sử dụng npm:
npm install table-of-content
Không yêu cầu thêm thư viện phụ thuộc ngoài trình duyệt hiện đại.
– Tạo mục lục nổi dựa trên các tiêu đề của trang.
– Hiển thị, ẩn nút TOC dựa trên khả năng hiển thị của nội dung.
– Cung cấp bảng TOC tương tác, đóng lại khi nhấp ra ngoài.
Thêm gói: Thêm script vào HTML hoặc nhập vào dự án JavaScript của bạn.
Kích hoạt tự động: Nút TOC xuất hiện khi cuộn qua nội dung có lớp .prose
và tạo TOC từ các tiêu đề.
Điều khiển thủ công (tùy chọn): Sử dụng initTableOfContents()
để bắt đầu thủ công hoặc destroy()
để xóa TOC.
Ví dụ sử dụng trong HTML:
<script src="node_modules/toc-generator/index.js"></script>
Ví dụ sử dụng trong JavaScript:
const { initTableOfContents } = require('toc-generator');
initTableOfContents();
toc.destroy();
– Email: info@nhavantuonglai.com.
– Website: nhavantuonglai.com.
Nếu bạn có câu hỏi hoặc đề xuất, đừng ngần ngại liên hệ để được hỗ trợ nhanh nhất.
Đừng quên star repository này nếu bạn thấy nó hữu ích.
FAQs
Table of Contents Generator is a JavaScript package that creates a floating table of contents (TOC) button and panel for website.
The npm package table-of-content receives a total of 182 weekly downloads. As such, table-of-content popularity was classified as not popular.
We found that table-of-content demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.