{"id":14989118,"url":"https://github.com/amio/userscript-parser","last_synced_at":"2025-04-12T01:30:41.433Z","repository":{"id":36344781,"uuid":"40649514","full_name":"amio/userscript-parser","owner":"amio","description":"Userscript metadata parser.","archived":false,"fork":false,"pushed_at":"2019-05-15T14:20:51.000Z","size":26,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T02:52:28.507Z","etag":null,"topics":["userscript","userscript-parser"],"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/amio.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}},"created_at":"2015-08-13T09:09:59.000Z","updated_at":"2022-12-02T01:39:49.000Z","dependencies_parsed_at":"2022-09-06T00:40:51.524Z","dependency_job_id":null,"html_url":"https://github.com/amio/userscript-parser","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fuserscript-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fuserscript-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fuserscript-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fuserscript-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amio","download_url":"https://codeload.github.com/amio/userscript-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248416654,"owners_count":21099911,"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":["userscript","userscript-parser"],"created_at":"2024-09-24T14:17:43.453Z","updated_at":"2025-04-12T01:30:41.176Z","avatar_url":"https://github.com/amio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# userscript-parser [![npm-version][npm-badge]][npm-link] [![install size][pp-badge]][pp-link]\n\nUserscript metadata parser.\n\n## Usage\n\n```javascript\nconst userscriptText = '// ==UserScript==...'\nconst usp = require('userscript-parser')\n\nconst { meta, metablock, content } = usp(userscriptText)\n```\n\nGiven this userscript:\n```javascript\n// ==UserScript==\n// @name        Awesome Script\n// @description This script even does the laundry!\n// @downloadURL https://www.example.com/myscript.user.js\n// @homepageURL https://github.com/gantt/downloadyoutube\n// @author      Gantt\n// @version     1.8.3\n// @date        2015-05-17\n// @include     https://www.youtube.com/*\n// @exclude     https://www.youtube.com/embed/*\n// @match       https://www.youtube.com/*\n// @grant       GM_xmlhttpRequest\n// @grant       GM_getValue\n// @grant       GM_setValue\n// @run-at      document-end\n// @license     MIT License\n// ==/UserScript==\n\nvar whoami = 'USERSCRIPT'\n```\n\nwill produce this parsed object:\n\n```javascript\n{\n  meta: {\n    description: [ 'This script even does the laundry!', ],\n    downloadURL: [ 'https://www.example.com/myscript.user.js' ],\n    name: [ 'Awesome Script' ],\n    homepageURL: [ 'https://github.com/gantt/downloadyoutube' ],\n    author: [ 'Gantt' ],\n    version: [ '1.8.3' ],\n    date: [ '2015-05-17' ],\n    include: [ 'https://www.youtube.com/*' ],\n    exclude: [ 'https://www.youtube.com/embed/*' ],\n    match: [ 'https://www.youtube.com/*' ],\n    grant: [ 'GM_xmlhttpRequest', 'GM_getValue', 'GM_setValue' ],\n    'run-at': [ 'document-end' ],\n    license: [ 'MIT License' ]\n  },\n  metablock: \"// ==UserScript==...\",\n  content: \"\\n\\nvar whoami = 'USERSCRIPT'\\n\"\n}\n```\n\n## License\n\nMIT @ Amio\n\n[npm-badge]: https://badgen.net/npm/v/userscript-parser\n[npm-link]: https://www.npmjs.com/package/userscript-parser\n[pp-badge]: https://badgen.net/packagephobia/publish/userscript-parser\n[pp-link]: https://packagephobia.now.sh/result?p=userscript-parser\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famio%2Fuserscript-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famio%2Fuserscript-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famio%2Fuserscript-parser/lists"}