{"id":15356615,"url":"https://github.com/adlered/contenteasyjs","last_synced_at":"2026-04-03T10:41:12.341Z","repository":{"id":105570159,"uuid":"185571425","full_name":"adlered/ContentEasyJS","owner":"adlered","description":":star2:Easily and automatically create directory navigation for your articles without configuration. | 轻松为你的网站文章设置右侧悬浮目录导航，支持点击跳转，不需要复杂的设置！JS | HTML | JQuery","archived":false,"fork":false,"pushed_at":"2019-07-23T02:30:43.000Z","size":360,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T06:42:11.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adlered.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-05-08T09:08:53.000Z","updated_at":"2025-02-27T23:24:41.000Z","dependencies_parsed_at":"2023-06-28T10:06:56.519Z","dependency_job_id":null,"html_url":"https://github.com/adlered/ContentEasyJS","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"6313d78ae26479f1c4f17211cdd0266e2fd73789"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adlered%2FContentEasyJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adlered%2FContentEasyJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adlered%2FContentEasyJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adlered%2FContentEasyJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adlered","download_url":"https://codeload.github.com/adlered/ContentEasyJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023727,"owners_count":21199958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T12:29:21.583Z","updated_at":"2026-04-03T10:41:12.294Z","avatar_url":"https://github.com/adlered.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ContentEasyJS\n:star2:Easily and automatically create directory navigation for your articles without configuration. | 轻松为你的网站文章设置右侧悬浮目录导航，支持点击跳转，不需要复杂的设置！\n\n[中文版本说明](#中文版本)\n\n[English version](#english-version)\n\n# Preview\n\n![](/pics/preview.png)\n\n# 中文版本\n\n请注意：在使用ContentEasy之前，必须先引用`JQuery`：\n\n```\n\u003cscript src=\"https://code.jquery.com/jquery-1.12.4.min.js\"\u003e\u003c/script\u003e\n```\n\n分别下载**JS**与**CSS**中的内容，在你的页面中引用（这里使用CDN，你可以改为自己的本地目录）：\n\n```\n\u003clink rel=\"stylesheet\" href=\"https://www.stackoverflow.wiki/User/contentEasy/css/contentEasy.min.css\" /\u003e\n\u003cscript type=\"text/javascript\" src=\"https://www.stackoverflow.wiki/User/contentEasy/js/contentEasy.min.js\"\u003e\u003c/script\u003e\n```\n\n紧接着，在网站中任意位置（建议将引用JS、CSS和以下代码都放在页面底部\u003c/body\u003e上方）写入下方内容：\n\n```\n\u003cscript\u003e\n    window.onload = function () {\n        contentEasy({\n            \"range\": \"\",\n            \"autoHide\" : \"true\"\n        });\n    };\n\u003c/script\u003e\n\u003cdiv class=\"contentEasy-window\"\u003e\n    \u003cul class=\"contentEasy-class\"\u003e\u003c/ul\u003e\n\u003c/div\u003e\n```\n\n由于contentEasy是悬浮在页面右侧的，所以可以将代码贴到任何位置。\n\n开启页面，你的网页应该自动为h1-h6标签建立了目录，并显示在页面右侧了。\n\ncontentEasy还预置了几个参数，可以在`\u003cscript\u003e`标签中添加或修改：\n\n参数名称|参数|默认值|作用\n-|-|-|-\nrange|`class`、`id`或`标签`名称|空|将扫描指定`class`、`id`或`标签`中的h1-h6标签建立为目录，为空则扫描整个页面，用法：`.class` / `#id` / `tag`\nautohide|true或false|false|设置为true，在页面加载时不显示目录，在向下滚动一次后显示。\ncontentClass|`class`、`id`或`标签`名称|.contentEasy-class|指定contentEasy默认追加目录显示的DIV\nwindowClass|`class`、`id`或`标签`名称|.contentEasy-window|指定contentEasy默认的窗体\n\n# English version\n\nPlease note: Before using ContentEasy, you must first reference `JQuery`:\n\n```\n\u003cscript src=\"https://code.jquery.com/jquery-1.12.4.min.js\"\u003e\u003c/script\u003e\n```\n\nDownload the contents of **JS** and **CSS** separately and refer to it on your page (use CDN here, you can change to your own local directory):\n\n```\n\u003clink rel=\"stylesheet\" href=\"https://www.stackoverflow.wiki/User/contentEasy/css/contentEasy.min.css\" /\u003e\n\u003cscript type=\"text/javascript\" src=\"https://www.stackoverflow.wiki/User/contentEasy/js/contentEasy.min.js\"\u003e\u003c/script\u003e\n```\n\nNext, write the following content anywhere on the site (recommended to reference JS, CSS, and the following code at the bottom of the page \u003c/body\u003e):\n\n```\n\u003cscript\u003e\n    Window.onload = function () {\n        contentEasy({\n            \"range\": \"\",\n            \"autoHide\" : \"true\"\n        });\n    };\n\u003c/script\u003e\n\u003cdiv class=\"contentEasy-window\"\u003e\n    \u003cul class=\"contentEasy-class\"\u003e\u003c/ul\u003e\n\u003c/div\u003e\n```\n\nSince contentEasy is floating on the right side of the page, you can paste the code anywhere.\n\nWhen you open the page, your web page should automatically create a directory for the h1-h6 tag and display it on the right side of the page.\n\ncontentEasy also presets several parameters that can be added or modified in the `\u003cscript\u003e` tag:\n\nParameter name|Parameter|Default value|Action\n-|-|-|-\nRange|`class`, `id` or `tag` name|empty|will be used to scan the h1-h6 tag in the `class`, `id` or `tag` to create a directory. If it is empty, scan the entire page. Usage: `.class` / `#id` / `tag`\nAutohide|true or false|false| is set to true, the directory is not displayed when the page is loaded, and is displayed after scrolling down once.\ncontentClass|`class`, `id` or `tag` name|.contentEasy-class|specify the contentEasy default append directory display DIV\nwindowClass|`class`, `id` or `tag` name|.contentEasy-window|specify contentEasy default form\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadlered%2Fcontenteasyjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadlered%2Fcontenteasyjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadlered%2Fcontenteasyjs/lists"}