{"id":19970196,"url":"https://github.com/webdeveric/popup-window","last_synced_at":"2025-05-04T01:30:43.002Z","repository":{"id":35121999,"uuid":"39316882","full_name":"webdeveric/popup-window","owner":"webdeveric","description":"Open popup windows","archived":false,"fork":false,"pushed_at":"2020-08-27T22:29:46.000Z","size":41,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T15:18:46.606Z","etag":null,"topics":["popup-window"],"latest_commit_sha":null,"homepage":null,"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/webdeveric.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2015-07-19T00:17:22.000Z","updated_at":"2024-01-05T06:22:13.000Z","dependencies_parsed_at":"2022-09-21T02:01:42.896Z","dependency_job_id":null,"html_url":"https://github.com/webdeveric/popup-window","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/webdeveric%2Fpopup-window","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdeveric%2Fpopup-window/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdeveric%2Fpopup-window/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdeveric%2Fpopup-window/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webdeveric","download_url":"https://codeload.github.com/webdeveric/popup-window/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252276955,"owners_count":21722447,"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":["popup-window"],"created_at":"2024-11-13T02:53:30.463Z","updated_at":"2025-05-04T01:30:42.666Z","avatar_url":"https://github.com/webdeveric.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Popup\n\n[![NPM](https://nodei.co/npm/popup-window.png)](https://nodei.co/npm/popup-window/)\n\n## Example usage\n\n```javascript\nlet win = new Popup(\n  'http://webdeveric.com/',\n  {\n    name: 'window name goes here', // Optional\n    width: 600,\n    height: 400\n  }\n);\n\nwin.opened( ( win ) =\u003e {\n  console.log('Popup has been opened');\n}).blocked( ( win ) =\u003e {\n  console.log('Popup has been blocked');\n}).closed( ( win ) =\u003e {\n  console.log('Popup has been closed');\n});\n\nwin.open();\n```\n\n## Window features\n\nThe window will have these features by default.\nYou can pass in an object with some or all of these settings to the constructor, as shown above.\nIf the `width` or `height` is null, it will be calculated to be half the screen width/height.\nIf the `left` or `top` is null, it will be calculated so that the window is in the center of the screen.\n\n```javascript\n{\n  width: null,\n  height: null,\n  left: null,\n  top: null,\n  menubar: 0,\n  toolbar: 0,\n  location: 1,\n  status: 1,\n  resizable: 1,\n  scrollbars: 1\n}\n```\n\n## Methods\n\n- **open** - open the window.\n- **close** - close the window.\n- **opened** - accepts a callback - the callback is called when the window is opened. \n- **closed** - accepts a callback - the callback is called when the window is closed. \n- **blocked** - accepts a callback - the callback is called when the window is blocked from opening. \n\nThe `opened`, `closed`, and `blocked` callbacks receive the `Popup` instance as the only argument.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdeveric%2Fpopup-window","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebdeveric%2Fpopup-window","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdeveric%2Fpopup-window/lists"}