{"id":19675830,"url":"https://github.com/progerxp/orphus","last_synced_at":"2025-04-29T02:30:43.241Z","repository":{"id":146023842,"uuid":"248267692","full_name":"ProgerXP/Orphus","owner":"ProgerXP","description":"A Tiny Typo Reporter For Web Pages","archived":false,"fork":false,"pushed_at":"2023-01-24T18:12:01.000Z","size":68,"stargazers_count":18,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T12:42:03.280Z","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":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProgerXP.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-18T15:19:45.000Z","updated_at":"2024-09-26T16:42:07.000Z","dependencies_parsed_at":"2023-07-24T15:45:39.889Z","dependency_job_id":null,"html_url":"https://github.com/ProgerXP/Orphus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FOrphus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FOrphus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FOrphus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FOrphus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProgerXP","download_url":"https://codeload.github.com/ProgerXP/Orphus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251420888,"owners_count":21586697,"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":[],"created_at":"2024-11-11T17:26:02.223Z","updated_at":"2025-04-29T02:30:43.236Z","avatar_url":"https://github.com/ProgerXP.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Orphus.js - A Tiny Typo Reporter\n\nOrphus is a tiny zero-configuration typo reporter for web pages.\n\n- 6K minified, 2K gzipped, no dependencies\n- invoked by Ctrl+Enter\n- reports arriving by e-mail (by default)\n- CORS-friendly (no AJAX, using `\u003ciframe\u003e` + `\u003cform\u003e`)\n- cross-browser - supports even Internet Explorer 6\n\nYou can see it in action [here](https://laravel.ru), [here](https://proger.me) or [here](https://squizzle.me/js/sqimitive). Read about patching for WordPress [here](https://cs-cs.net/sistema-orphus#_orphus_progerxp____202301) (in Russian).\n\n---\n\n![Screenshot](https://raw.githubusercontent.com/ProgerXP/Orphus/master/screenshot.png)\n\n\n## Installation\n\n### Frontend (JavaScript)\n\nPut the following line anywhere **inside `\u003cbody\u003e`** (not inside `\u003chead\u003e`):\n\n```\n\u003cscript src=\"https://proger.me/orphus.js\"\u003e\u003c/script\u003e\n```\n\nIt's best put early in `\u003cbody\u003e` so that Ctrl+Enter starts working without waiting for a long page to finish loading. Also, adding `async` or `defer` to that `\u003cscript\u003e` improves performance (but `defer` has the same effect as putting `\u003cscript\u003e` right before `\u003c/body\u003e`).\n\nIf you want to configure Orphus, do this anywhere **before** that line. For example, by default reports are sent to `/orphus.php` but you can use the PHP script on my page without touching your backend:\n\n```\n\u003cscript\u003e\n  // Keys for what will become orphus.opt after loading.\n  orphus = {\n    action: 'https://proger.me/orphus.php',\n    strings: {\n      subject: 'Typo Reported',\n    },\n    // If using proger.me/orphus.php, tell me where to forward your reports:\n    //email: 'you@example.com',\n  }\n\u003c/script\u003e\n```\n\n`orphus.js` hooks `onkeypress` immediately after it was loaded (warning: `document`'s properties `onkeypress` and `onkeydown` must not be used outside of Orphus).\n\nThereafter you can call its methods via the global `orphus` object which can be also used for configuration:\n\n```\norphus.opt.strings.send = 'Отправить'\norphus.show()\n```\n\nFinally, write and include your own styles (you can take `original/orphus-orig.css` as a basis). Note: centering works best with `#orphusp { box-sizing: border-box; }`.\n\n### Self-Hosted (PHP 5.4+)\n\nFollow the instructions above to install the frontend, then copy `orphus.php` to your web root (or change `orphus.opt.action`).\n\nAfter that either edit the PHP script (not recommended) or create a new script `orphus-local.php` alongside the first and put your specific configuration there. At minimum, you need to set the recipient's e-mail address because for spam reasons `?email` (`orphus.opt.email`) is ignored by default.\n\n```\n\u003c?php\n// orphus-local.php\n$vars['email'] = 'webmaster@proger.me';\n```\n\nYou can also override the texts, input variables, `mail()` function, etc. - see `orphus.php` for details.\n\n\n## License Information\n\nSadly, the license terms are not mentioned anywhere on the original project's page. However, it was abandoned since at least 2015 (see my [forum post](http://www.orphus.ru/community/orphus/common/Ssl.html); [archived version](https://archive.md/6Q5Tl)) so there should be no issue in using it.\n\nI have written the server-side PHP reporting script from scratch and that one is released in public domain ([CC0](https://creativecommons.org/publicdomain/zero/1.0/)). My edits on `orphus.js` are also under CC0.\n\n\n## Attribution\n\n- http://www.orphus.ru - the original project's homepage\n- http://www.koterov.ru - the original author's homepage\n\n### Differences\n\nThese are in addition to differences described [here](original/README.md):\n\n- exposed all methods and `opt`ions via `window.orphus`\n- made it possible to initialize `opt` by setting `window.orphus` before the script was loaded\n- removed default `email`, changed `homepage`, renamed `width` to `maxWidth` (and changed from `550` to `650` pixels)\n- added new `opt.strings.submitex` and a `try`/`catch` in `showFor()`\n- removed `showMethod` variable (direct call by name), renamed `showMethod()` to `showFor()`\n- moved `iframe`, `submitted` and `lastComment` to `self`/`window.orphus`\n- moved `email` deobfuscation from `run()` to `self.deobfuscate()`\n- removed setting `zIndex` on `#orphusp`\n- removed the code for temporary hiding `\u003cselect\u003e`s for IE \u003c= 6\n- removed hardcoded margins (was min. X/Y 10px)\n- added the check for no ranges in `getSelection()` to avoid subsequent exception in `getRangeAt(0)` (can happen if user didn't click inside `\u003cbody\u003e` since loading)\n\n\n## To Do\n\n- add background shader while `#orphusp` is visible\n  - click on it works as `Cancel`\n- replace using `onkeypress`/`onkeyup` with `addEventListener()`\n- migrate CSS classes to [BEM](http://bem.info) (will require changing existing stylesheets)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogerxp%2Forphus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogerxp%2Forphus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogerxp%2Forphus/lists"}