{"id":20105780,"url":"https://github.com/thbkrkr/s.js","last_synced_at":"2026-06-08T11:31:24.546Z","repository":{"id":78589178,"uuid":"55639919","full_name":"thbkrkr/s.js","owner":"thbkrkr","description":"zepto.js + moment.js + some goodies","archived":false,"fork":false,"pushed_at":"2017-06-30T00:20:00.000Z","size":746,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T17:48:20.282Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thbkrkr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-06T20:56:04.000Z","updated_at":"2016-12-05T13:56:15.000Z","dependencies_parsed_at":"2023-05-02T02:15:39.002Z","dependency_job_id":null,"html_url":"https://github.com/thbkrkr/s.js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thbkrkr/s.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thbkrkr%2Fs.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thbkrkr%2Fs.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thbkrkr%2Fs.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thbkrkr%2Fs.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thbkrkr","download_url":"https://codeload.github.com/thbkrkr/s.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thbkrkr%2Fs.js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34061120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":"2024-11-13T17:48:08.185Z","updated_at":"2026-06-08T11:31:24.527Z","avatar_url":"https://github.com/thbkrkr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# s.js\n\nGoodies + [zepto|jquery][moment][semantic].\n\n- goodies (s.xyz.js **3.1ko**)\n- goodies + zepto.js (s.xyz.z.js **29ko**)\n- goodies + jquery.js (s.xyz.j.js **88ko**)\n- goodies + zepto.js  + moment.js (s.xyz.zm.js (**87ko**)\n- goodies + jquery.js + moment.js (s.xyz.jm.js **145ko**)\n- goodies + zepto.js  + semantic.js (s.xyz.zs.js **298ko**)\n- goodies + jquery.js + semantic.js (s.xyz.js.js **357ko**)\n- goodies + zepto.js  + semantic.js + moment.js (s.xyz.zsm.js **356ko**)\n- goodies + jquery.js + semantic.js + moment.js (s.xyz.jsm.js **414ko**)\n\n## Goodies\n\n```\n# Load HTML templates then call a function\n$loadTpls(tpls, onSuccess)\n\n# Fill a template with data\n$tpl(str, data)\n\n# HTTP GET\n$get(url, onSuccess, onFailure, noauth)\n\n# HTTP POST\n$post(url, data, onSuccess, onFailure, noauth)\n\n# @ Sync the result of an HTTP GET (/\u003caction\u003e or obj.url or actions[actions].url or obj.url)\n# in a html element (class: ui-\u003caction\u003e) using a template (id: tpl_\u003caction\u003e)\n$sync(action, obj)\n\n# Call an action, like $sync with more features:\n# toggle '.ui-\u003caction\u003e'' html elements\n# update the browser history\n# show optionally a loading template\n$call(action)\n\n# Bind actions on click\n$bind(actions)\n\n# Extract query param from the URL\n$param(name)\n\n# Round number using numeral\n$roundNumeral(val)\n\n# Round number\n$round(val)\n\n# Return from now\n$fromNow(timestamp)\n\n# Put k/v in the local storage\n$lsSet(key, value)\n\n# Get k/v from the local storage\n$lsGet(key)\n\n# Remove k/v from the local storage\n$lsRm(key)\n\n# Scroll to the bottom of an element in a given duration\n$scrollToBottom(element, duration)\n\n# Resize the element height to the window height less a given height\n$setElementHeight(elemClass, height)\n\n# Create a WebSocket\n$ws(url, onopenF, oncloseF, onmessageF)\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthbkrkr%2Fs.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthbkrkr%2Fs.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthbkrkr%2Fs.js/lists"}