{"id":25158464,"url":"https://github.com/raiper34/device-rotation-prompt","last_synced_at":"2025-04-30T11:12:38.238Z","repository":{"id":176491832,"uuid":"658069700","full_name":"Raiper34/device-rotation-prompt","owner":"Raiper34","description":"The device rotation prompt is the library to show a fullscreen prompt message when device orientation is different than you expect.","archived":false,"fork":false,"pushed_at":"2025-04-14T12:16:16.000Z","size":2467,"stargazers_count":16,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-26T00:03:51.088Z","etag":null,"topics":["device","orientation","prompt","rotate"],"latest_commit_sha":null,"homepage":"https://device-rotation-prompt.netlify.app/","language":"TypeScript","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/Raiper34.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-06-24T17:07:49.000Z","updated_at":"2025-04-09T10:25:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"c18e4f56-6fdc-4049-9418-ca34d2fdb722","html_url":"https://github.com/Raiper34/device-rotation-prompt","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"4ddc6c682657a8b2596457a2aa85565e7fa1c6a2"},"previous_names":["raiper34/device-rotation-prompt"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raiper34%2Fdevice-rotation-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raiper34%2Fdevice-rotation-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raiper34%2Fdevice-rotation-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raiper34%2Fdevice-rotation-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Raiper34","download_url":"https://codeload.github.com/Raiper34/device-rotation-prompt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251687006,"owners_count":21627509,"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":["device","orientation","prompt","rotate"],"created_at":"2025-02-09T01:51:47.234Z","updated_at":"2025-04-30T11:12:38.162Z","avatar_url":"https://github.com/Raiper34.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/device-rotation-prompt.svg)](https://badge.fury.io/js/device-rotation-prompt)\n[![docs](https://badgen.net/badge/docs/online/orange)](https://device-rotation-prompt.netlify.app)\n![npm bundle size](https://img.shields.io/bundlephobia/min/device-rotation-prompt)\n![NPM](https://img.shields.io/npm/l/device-rotation-prompt)\n[![CircleCI](https://circleci.com/gh/Raiper34/device-rotation-prompt.svg?style=shield)](https://circleci.com/gh/Raiper34/device-rotation-prompt)\n[![Coverage Status](https://coveralls.io/repos/github/Raiper34/device-rotation-prompt/badge.svg?branch=main)](https://coveralls.io/github/Raiper34/device-rotation-prompt?branch=main)\n[![npm](https://img.shields.io/npm/dt/device-rotation-prompt)](https://badge.fury.io/js/device-rotation-prompt)\n[![npm](https://img.shields.io/npm/dm/device-rotation-prompt)](https://badge.fury.io/js/device-rotation-prompt)\n[![npm](https://img.shields.io/npm/dw/device-rotation-prompt)](https://badge.fury.io/js/device-rotation-prompt)\n[![](https://data.jsdelivr.com/v1/package/npm/device-rotation-prompt/badge?style=rounded)](https://www.jsdelivr.com/package/npm/device-rotation-prompt)\n[![GitHub Repo stars](https://img.shields.io/github/stars/raiper34/device-rotation-prompt)](https://github.com/Raiper34/device-rotation-prompt)\n\n# Device rotation prompt\n\nThe device rotation prompt is the library to show a fullscreen prompt message when device orientation is different than you expect.\nIt is designed to be used in html5 games, but it can be used on any website.\n\n### Content\n- [🚀 Installation](#-instalation)\n- [📚 Documentation](#-documentation)\n- [💻 Usage](#-usage)\n    - [🌐 Browser](#-browser)\n- [⚖️ License](#-license)\n\n# 🚀 Instalation\nInstall **Device rotation prompt** library using npm\n```sh\nnpm install device-rotation-prompt --save\n```\nor with jsdelivr\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/device-rotation-prompt@4.0.0/dist/device-rotation-prompt.iife.js\"\u003e\u003c/script\u003e\n```\n\n# 📚 Documentation\nFor more details and complete documentation check: https://device-rotation-prompt.netlify.app/\n\n# 💻 Usage\nIf you do not need to configure and the default style and setting are enough, you can just instantiate the class and you are done.\n```javascript\nconst prompt = new DeviceRotationPrompt();\n```\nand you get\n\n![Device rotation prompt demo](demo.gif)\n\nIf you do not need this functionality anymore, you can destroy it using `destroy` method.\n```javascript\nprompt.destroy();\n```\n\nIf you want to configure the behavior and style of the prompt, you can pass the config object during instantiation.\n```javascript\nconst prompt = new DeviceRotationPrompt({\n    orientation: DeviceOrientation.Landscape,\n    backgroundColor: '#000000',\n    imageColor: '#ffffff',\n    ...\n});\n```\nThe properties are as follows and all are optional: https://device-rotation-prompt.netlify.app/interfaces/iconfig\n\n## 🌐 Browser\nYou can also use this library in the browser without compiling using jsDelivr.\nImport script into HTML file, and you can access classes through the global `treeUtils` object.\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/device-rotation-prompt@4.0.0/dist/device-rotation-prompt.iife.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    const prompt = new deviceRotationPrompt.DeviceRotationPrompt({orientation: 'landscape'});\n\u003c/script\u003e\n```\n\n# ⚖️ License\n[MIT](https://choosealicense.com/licenses/mit/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraiper34%2Fdevice-rotation-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraiper34%2Fdevice-rotation-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraiper34%2Fdevice-rotation-prompt/lists"}