{"id":25470037,"url":"https://github.com/thinkphp/toc","last_synced_at":"2025-07-23T14:07:15.357Z","repository":{"id":964136,"uuid":"754780","full_name":"thinkphp/TOC","owner":"thinkphp","description":"TOC is a MooTools Plugin which turn a list of HTML headings into a Table of Content","archived":false,"fork":false,"pushed_at":"2010-07-03T11:29:42.000Z","size":160,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-03T20:31:30.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://thinkphp.ro/apps/js-hacks/toc/mootools/toc.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thinkphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-07-03T07:53:58.000Z","updated_at":"2025-01-22T20:13:37.000Z","dependencies_parsed_at":"2022-08-16T11:40:09.624Z","dependency_job_id":null,"html_url":"https://github.com/thinkphp/TOC","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/thinkphp/TOC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2FTOC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2FTOC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2FTOC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2FTOC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkphp","download_url":"https://codeload.github.com/thinkphp/TOC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkphp%2FTOC/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266691580,"owners_count":23969182,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-02-18T08:31:46.154Z","updated_at":"2025-07-23T14:07:15.330Z","avatar_url":"https://github.com/thinkphp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"TOC\n===\n\nTOC is a MooTools Plugin which turn a list of HTML headings into a Table of Content.\n\n![Screenshot](http://farm5.static.flickr.com/4117/4757170244_07f03e67e9_b.jpg)\n\n \nHow to Use\n----------\n\nTOC can be initialized an any time, but will most likely be initialized at DOMReady.\n\n\nFirst you must to include the JS files in the head of your HTML document.\n       \n     #HTML\n     \u003cscript type=\"text/javascript\" src=\"mootools-core.js\"\u003e\u003c/script\u003e\n     \u003cscript type=\"text/javascript\" src=\"toc.js\"\u003e\u003c/script\u003e\n\nIn your JavaScript code:\n\n     #JS\n     window.addEvent('domready',function(){\n        var toc = new TOC('toc');\n     }); \n\nIn your HTML code:\n\n     #HTML\n     \u003cdiv id=\"toc\"\u003e\u003c/div\u003e\n     \u003ch1\u003eUnobtrusive JavaScript\u003c/h1\u003e\n     \u003ch2\u003eOperation Cleanout\u003c/h2\u003e\n     \u003ch3\u003eNever, under any circumstances add JavaScript directly to the document\u003c/h3\u003e\n     \u003ch3\u003eJavaScript is an enhancement, not a secure functionality\u003c/h3\u003e\n     \u003ch3\u003eCheck the availability of the object before accessing it\u003c/h3\u003e\n     \u003ch3\u003eCreate JavaScript, not browser specific dialects\u003c/h3\u003e\n     \u003ch3\u003eDon't hijack other script's variables\u003c/h3\u003e\n     \u003ch3\u003eKeep effects mouse independent\u003c/h3\u003e\n     \u003ch2\u003eReach what you want to change\u003c/h2\u003e\n     \u003ch3\u003eFunction to reach an element in the page\u003c/h3\u003e\n     \u003ch3\u003eTool to navigate from a certain element\u003c/h3\u003e\n     \u003ch3\u003eAttributes and functions for elements\u003c/h3\u003e\n     \u003ch2\u003eCreating and destroying elements\u003c/h2\u003e\n     \u003ch3\u003ecreateElement(element)\u003c/h3\u003e\n     \u003ch3\u003ecreateTextNode(string)\u003c/h3\u003e\n     \u003ch3\u003esetAttribute(attribute,value)\u003c/h3\u003e\n     \u003ch3\u003eappendChild(child)\u003c/h3\u003e\n     \u003ch3\u003ecloneNode\u003c/h3\u003e\n     \u003ch3\u003ehasChildNodes()\u003c/h3\u003e\n     \u003ch3\u003einsertBefore(newChild,oldChild)\u003c/h3\u003e\n     \u003ch3\u003eremoveChild(oldChild)\u003c/h3\u003e\n     \u003ch3\u003ereplaceChild(newChild,oldChild)\u003c/h3\u003e\n     \u003ch3\u003eremoveAttribute(attribute)\u003c/h3\u003e\n     \u003ch2\u003eSeparated JS and CSS\u003c/h2\u003e\n     \u003ch3\u003eOur mistake\u003c/h3\u003e\n     \u003ch3\u003eApplying classes via JavaScript\u003c/h3\u003e\n     \u003ch3\u003eMultiple classes syntax\u003c/h3\u003e\n     \u003ch2\u003eUseful links\u003c/h2\u003e\n     \u003ch3\u003ehttp://www.w3.org/DOM\u003c/h3\u003e\n     \u003ch3\u003eQuirksmode.org\u003c/h3\u003e\n     \u003ch3\u003eThe W3C DOM specification (http://www.w3.org/DOM/)\u003c/h3\u003e\n     \u003ch3\u003ehttp://www.scottandrew.com/weblog/jsjunk#events\u003c/h3\u003e ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkphp%2Ftoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkphp%2Ftoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkphp%2Ftoc/lists"}