{"id":20182113,"url":"https://github.com/nichoth/notes-js","last_synced_at":"2026-02-24T01:31:45.317Z","repository":{"id":34733726,"uuid":"38711895","full_name":"nichoth/notes-js","owner":"nichoth","description":"JS notes","archived":false,"fork":false,"pushed_at":"2016-02-01T22:20:09.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-27T21:34:55.437Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/nichoth.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":"2015-07-07T20:07:10.000Z","updated_at":"2016-03-19T23:08:16.000Z","dependencies_parsed_at":"2022-09-15T03:51:41.107Z","dependency_job_id":null,"html_url":"https://github.com/nichoth/notes-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nichoth/notes-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Fnotes-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Fnotes-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Fnotes-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Fnotes-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nichoth","download_url":"https://codeload.github.com/nichoth/notes-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichoth%2Fnotes-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29766301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T01:28:30.166Z","status":"ssl_error","status_checked_at":"2026-02-24T01:28:27.518Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-11-14T02:37:42.141Z","updated_at":"2026-02-24T01:31:45.289Z","avatar_url":"https://github.com/nichoth.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# notes\n\n\n## performance\n\n[Paul Lewis, SmashingConf Oxford 2015](https://vimeo.com/125121010)  \nIn depth about animation frames, optimizing JS.\n\n[Paul Lewis, You should use [insert library/framework]](https://www.youtube.com/watch?v=_yCz1TA0EL4)  \nManual DOM manipulation is fastest, followed by backbone.\n\n[Event loop explanation](https://www.youtube.com/watch?v=8aGhZQkoFbQ)  \nPhillip Roberts of \u0026yet.\n\n\n## dom stuff\n\n### removeEventListener\n\n```js\nelmt.addEventListener('click', function handler(ev) {\n    // do some stuff\n    this.removeEventListener(ev.type, handler);\n});\n```\n\n### vertical scroll amount\n\n```js\nwindow.pageYOffset\n```\n[cross-browser](https://github.com/yields/scrolltop): `npm install scrolltop`\n\n```js\nvar st = require('scrolltop');\nconsole.log(st());\n```\n\n### scroll events with requestAnimationFrame\n\n```js\nvar scrolltop = require('scrolltop');\nvar rafScroll = require('raf-scroll');\nvar offset = myElmt.offsetTop;\n\n// parallax -- scroll at 1/3 normal speed\nfunction update() {\n  var scr = scrolltop();\n  myElmt.style.top = (offset - (scr*0.3)) + 'px';\n}\n\nrafScroll.init();\nrafScroll.add(update);\n```\n\n### accessible for clients without JS\n\nindex.html\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\" class=\"no-js\"\u003e\n\u003chead\u003e\n  \u003cscript\u003e\n    document.querySelector('html').className = '';\n  \u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cdiv class=\"hidden\"\u003emy content\u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nstyle.css\n```css\n.hidden {\n  opactiy: 0;\n}\n.no-js .hidden {\n  opactiy: 1 !important;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichoth%2Fnotes-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnichoth%2Fnotes-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichoth%2Fnotes-js/lists"}