{"id":20935528,"url":"https://github.com/eypsilon/browser-reload","last_synced_at":"2026-04-28T21:31:35.624Z","repository":{"id":161937069,"uuid":"487241923","full_name":"eypsilon/browser-reload","owner":"eypsilon","description":"Auto Refresh / Reload Browser","archived":false,"fork":false,"pushed_at":"2023-11-19T23:53:05.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-19T19:58:07.662Z","etag":null,"topics":["php","xdotool"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/eypsilon.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":"2022-04-30T10:01:09.000Z","updated_at":"2022-07-27T20:47:30.000Z","dependencies_parsed_at":"2023-11-20T00:38:14.977Z","dependency_job_id":null,"html_url":"https://github.com/eypsilon/browser-reload","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eypsilon%2Fbrowser-reload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eypsilon%2Fbrowser-reload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eypsilon%2Fbrowser-reload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eypsilon%2Fbrowser-reload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eypsilon","download_url":"https://codeload.github.com/eypsilon/browser-reload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243330259,"owners_count":20274037,"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":["php","xdotool"],"created_at":"2024-11-18T22:15:25.687Z","updated_at":"2026-04-28T21:31:30.589Z","avatar_url":"https://github.com/eypsilon.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BroRelo - Browser Auto Refresh / Reload for Firefox, Chrome \u0026 Opera\n\n`Ubuntu 21.10 | Apache/2.4.48 | PHP 8.0.18`\n\nThis package can reload windows regardless of which Browser are in them and without the need of any additional Browser-extensions for any Browser.\n\nCurrently it works with Firefox, Chrome, Brave \u0026 Opera (but it should work with all Browsers). It doesn't even needs a URL or IP to work, but a identifier in the Title `\u003ctitle\u003e\u003c/title\u003e` of the Page. And it also doesn't use an observer or services in order to work, it runs, when it's requested.\n\n@install [xdotool - window management](https://www.semicomplete.com/projects/xdotool/)\n\n```sh\nsudo apt-get install xdotool\n```\n---\n\n@install `browser-reload`\n\n```sh\n# create directory, if not exists\nmkdir -p ~/bin/browser-reload\n\n# enter directory\ncd ~/bin/browser-reload\n\n# get browser-reload\ngit clone https://github.com/eypsilon/browser-reload.git\n\n# make it executable\nchmod +x ~/bin/browser-reload/browser-reload.php\n```\n\nTo restrict the script to your local environment, set an EnvVar on your local Server and pass it to Env. For Apache2:\n\n```sh\nsudo gedit /etc/apache2/envvars\n# append\nexport LOCAL_MACHINE_TITLE=\" local-dev-many-title\"\n```\n\n```sh\nsudo gedit /etc/apache2/apache2.conf\n# put\nPassEnv LOCAL_MACHINE_TITLE\n```\n\nSee `config.php.example` to set custom default configs and handle error occurrences.\n\n---\n\nTo now make a Page (window) auto reloadable, just put the EnvVar in it's Title (or the value itself). This script searches in windownames of open windows to check if they contain the specified EnvVar. If a Window matches the criteria, the key defined in `$config['trigger_key']` will get fired (\"F5\" | \"ctrl+r\").\n\nMultiple windows with multiple Browsers at the same time are working as well - the Pages have to be active in the windows they're in (visible, top tab), and that's it.\n\n```php\n\u003ctitle\u003e...\u003c?= /*local*/ $_SERVER['LOCAL_MACHINE_TITLE'] ?? null ?\u003e\u003c/title\u003e\n```\n\n---\n\n## Visual Studio Code\n\nTo reload Browser on save, @install [vscode-run-on-save](https://github.com/pucelle/vscode-run-on-save)\n\n`~/.config/Code/User/settings.json`\n\n```jsonc\n{\n    \"runOnSave.statusMessageTimeout\": 1000,\n    \"runOnSave.commands\": [\n        {\n            \"match\": \".*\",\n\n            // # Options\n            // \"command\": \"...browser-reload.php    Options=GoesHere\",\n\n            // output=true                          // [false | 'minimal'] :: default true\n            // set_timeout=0.1                      // \u003e 0                 :: default 0.1\n            // trigger_key='ctrl%2Br'               // ['F5' | 'ctrl%2Br'] :: default 'ctrl+r'\n            // srch_title='local-dev-many-title'    // (string)            :: default 'local-dev-many-title'\n\n            // # set custom Browser names to search for. To get\n            // # the Name of a window, run \"xprop | grep WM_CLASS\"\n            // # and click the window of interest. Defaults are\n            // srch_browser[]=Navigator\n            // srch_browser[]=Google-chrome\n            // srch_browser[]=Opera\n\n            // # Additional titles to search for, on error for example\n            // # see config.php.example for more infos\n            // match_title[]='Mozilla Firefox'\n\n            // # Add regexe, see config.php.example for more infos\n            // regex_title[]='~localhost.loc~'\n\n            // # the file, that has triggered the reload\n            // filename=${fileBasename}\n            // extension=${fileExtname}\n            // file=${file}\n            // dir=${fileDirname}\n\n            \"command\": \"~/bin/browser-reload/browser-reload.php\",\n            \"runIn\": \"backend\",\n            \"runningStatusMessage\": \"BrowserReload started ${fileBasename}\",\n            \"finishStatusMessage\": \"BrowserReload done, ${fileBasename}\"\n        }\n    ]\n}\n```\n\nEnable / Disable via cmd `ctrl+shift+p`\n\n```cmd\nRun On Save: Enable\nRun On Save: Disable\n```\n\nCheck response output: `ctrl+k + ctrl+h` \u003e Output \u003e \"Run on Save\"\n\n---\n\n### Custom Config\n\nUse custom configs to overwrite default configs. Set a list of strings to handle errors on your Page.\n\n---\n\n#### Regular Expressions\n\nSet regular expressions to handle error pages. See 'config.php.example' for more infos.\n\n---\n\n##### Add Aliases (optional)\n\n```sh\n~$ sudo gedit ~/.bash_aliases\n\nalias BrowserReload='~/bin/browser-reload/browser-reload.php'\nalias BrowserReloadQuiet='~/bin/browser-reload/browser-reload.php output=false'\n\n~$ source ~/.bash_aliases\n```\n\nwith Aliases in place, we can reload open windows from the terminal with\n\n```js\nBrowserReload\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feypsilon%2Fbrowser-reload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feypsilon%2Fbrowser-reload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feypsilon%2Fbrowser-reload/lists"}