{"id":16527552,"url":"https://github.com/johvin/guideline","last_synced_at":"2025-10-09T12:07:52.961Z","repository":{"id":57145586,"uuid":"125988898","full_name":"johvin/guideline","owner":"johvin","description":"A simple guideline tool based on which you can quickly implement new features guidelines for website users","archived":false,"fork":false,"pushed_at":"2018-04-26T01:30:33.000Z","size":74,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T12:07:50.749Z","etag":null,"topics":["guide","guideline","new-feature-guideline","product-guideline","website"],"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/johvin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-03-20T08:59:01.000Z","updated_at":"2018-05-02T10:32:21.000Z","dependencies_parsed_at":"2022-09-05T13:00:39.638Z","dependency_job_id":null,"html_url":"https://github.com/johvin/guideline","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/johvin/guideline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johvin%2Fguideline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johvin%2Fguideline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johvin%2Fguideline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johvin%2Fguideline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johvin","download_url":"https://codeload.github.com/johvin/guideline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johvin%2Fguideline/sbom","scorecard":{"id":529326,"data":{"date":"2025-08-11","repo":{"name":"github.com/johvin/guideline","commit":"1253fea06671bb636985d68b049e02bd3eb4ec32"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T05:19:44.282Z","repository_id":57145586,"created_at":"2025-08-20T05:19:44.282Z","updated_at":"2025-08-20T05:19:44.282Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001441,"owners_count":26083078,"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-10-09T02:00:07.460Z","response_time":59,"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":["guide","guideline","new-feature-guideline","product-guideline","website"],"created_at":"2024-10-11T17:35:55.006Z","updated_at":"2025-10-09T12:07:52.931Z","avatar_url":"https://github.com/johvin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# New Features Guideline (新功能指引)\n\n[![Version npm][version]](https://www.npmjs.com/package/guideline?activeTab=versions)\n[![Build Status][build]](https://travis-ci.org/johvin/guideline)\n[![Dependencies][david]](https://david-dm.org/johvin/guideline)\n[![Known Vulnerabilities][vulnerabilities]](https://snyk.io/test/npm/guideline)\n[![License][license]](https://opensource.org/licenses/MIT)\n\n[version]: https://img.shields.io/npm/v/guideline.svg?style=flat-square\n[build]: http://img.shields.io/travis/johvin/guideline/master.svg?style=flat-square\n[david]: https://img.shields.io/david/johvin/guideline.svg?style=flat-square\n[vulnerabilities]: https://snyk.io/test/npm/guideline/badge.svg?style=flat-square\n[license]: https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat-square\n\n\u003e This is a simple guideline tool based on which you can quickly implement new features guidelines for website users.\n\n## Usage\n\nThere are two ways to play a guideline, a simple way and an advanced way. The simple way is an encapsulation of the advanced way which can do more setting and control the playing of guideline.\n\n*Guideline also supports using keyboard shortcuts to control playback. See the relevant part of API for details*\n\n### Simple way\n\n```js\nconst guideline = require('guideline');\n\nconst visitTimes = parseInt(localStorage.getItem('visitTimes')) || 0;\n\nif (visitTimes === 0) {\n  const guideOptions = [{\n    content: 'Welcome, the new features guidelines come online !'\n  }, {\n    element: document.getElementById('notificationwrapper'),\n    content: 'all system messages and notification is here',\n    style: 'font-size: 20px; color: red;',\n    position: 'top'\n  }, {\n    element: document.querySelector('.datepicker-hint'),\n    content: 'datepicker hint will tell you the datepicker\\'s date range restriction',\n    position: 'bottom'\n  }];\n\n  guideline(guideOptions, function () {\n    console.log('guideline is over');\n  });\n}\n```\n\n### Advanced way\n\n```js\nconst guideline = require('guideline');\n\n// something else ...\n\nconst guideOptions = [{\n  content: 'Welcome, the new features guidelines come online !'\n}, {\n  element: document.getElementById('notificationwrapper'),\n  content: 'all system messages and notification is here',\n  style: 'font-size: 20px; color: red;',\n  position: 'top'\n}, {\n  element: document.querySelector('.datepicker-hint'),\n  content: 'datepicker hint will tell you the datepicker\\'s date range restriction',\n  position: 'bottom'\n}];\n\nconst gl = new guideline.Guideline(guideOptions, function (total, played) {\n  console.log('guideline is over, total valid ', total, 'played ', played);\n});\n\n// set hint text maximum width\ngl.hintTextMaxWidth = 800\n// set hint text font size\ngl.hintFontSize = 20\n\n// start the guideline\ngl.play();\n\n// autoplay the next hint every 3 seconds\nconst timer = setInterval(function () {\n  if (gl.hasNext()) {\n    gl.next();\n  } else {\n    clearInterval(timer);\n    gl.stop();\n  }\n}, 3000);\n```\n\n## API\n\n### guideline(configuration, callback)\n\nThis is the simple way to play a guideline which accepts two parameters whose description are listed in the relevant sections as follows.\n\n### guideline.Guideline Constructor (configuration, callback)\n\nThis is the advanced way to play a guideline which parameters are the same as `guideline(configuration, callback)`. It will return a Guideline instance based on whose prototype's method you can do more control during the playing.\n\n### configuration - guideline(configuration)\n\nThe configuration item should be an array, each of which is an object.\n\n#### Configuration Subitem Object\n\nProperties:\n- element (HTMLElement, optional) : the guided element. when `element` is null, the guideline text is centered relative to the browser window.\n- content (string, required) : the guideline text.\n- position (string, optional, defaults to 'bottom') : used to set the location of the guideline text relative to the guided element. enumerated type，value is `'top'` or `'bottom'`.\n- style (string, optional) : custom style for the guideline text.\n\n### callback(total, playedAmount) - guideline(configuration, callback)\n\n`callback` is a function, which will be invoked when the guideline stops. `callback` takes two parameters `total` and `playedAmount`, representing the total amount of valid hints and the actual playback amount of hints.\n\n### Guideline instance properties\n\n- hintTextMaxWidth (number, defaults to 400) : used to limit the hint text maximum width, unit is pixel.\n- hintFontSize (number, defaults to 24) : used to define the hint text font size, unit is pixel.\n\n### Guideline instance method\n\n- play : start the guideline after doing some settings\n- prev : play the previous hint\n- next : play the next hint, if there's no more hint, stop the guideline and exit\n- hasNext : tell if there is a follow-up hint\n- stop : stop playing the \bguideline\n\n### Keyboard shortcuts\n\nGuideline supports some keyboard shortcuts to play the next or previous hint as follows.\n\n| keyboard | action |\n| --- | --- |\n| arrow right | play next |\n| enter | play next |\n| space | play next |\n| arrow left | play previous |\n| backspace | play previous |\n| esc | stop playing |\n\n## CHANGELOG\n\n[`CHANGELOG`](./CHANGELOG.md)\n\n## License\n\nMIT\n\n## References\n\n- http://ejulianova.github.io/guides/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohvin%2Fguideline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohvin%2Fguideline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohvin%2Fguideline/lists"}