{"id":22435068,"url":"https://github.com/leejones/prepare_links","last_synced_at":"2025-08-01T14:31:30.411Z","repository":{"id":638790,"uuid":"280361","full_name":"leejones/prepare_links","owner":"leejones","description":"jQuery plugin to launch external links in a new window automatically.","archived":false,"fork":false,"pushed_at":"2010-01-31T15:43:05.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-04-18T19:50:39.365Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leejones.png","metadata":{"files":{"readme":"README.mdown","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}},"created_at":"2009-08-17T21:11:13.000Z","updated_at":"2012-12-13T00:20:28.000Z","dependencies_parsed_at":"2022-08-16T10:35:06.553Z","dependency_job_id":null,"html_url":"https://github.com/leejones/prepare_links","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leejones%2Fprepare_links","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leejones%2Fprepare_links/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leejones%2Fprepare_links/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leejones%2Fprepare_links/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leejones","download_url":"https://codeload.github.com/leejones/prepare_links/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228383640,"owners_count":17911330,"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-12-05T23:12:23.773Z","updated_at":"2024-12-05T23:12:24.390Z","avatar_url":"https://github.com/leejones.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jQuery Prepare Links Plugin\n\nAutomagically open links to other sites in a new window.\n\nI'm generally not a huge fan of opening links in a new window, but clients frequently want this functionality on their sites.\n\n## Basic Usage\nOpens all links outside of your domain in a new window.\n\n    $(document).ready(function() {\n    \t$(\"a\").prepare_links();\n    });\n    \nConsiders same domain, subdomain, and localhost to be internal links by default.  See the options to change default behavior.\n\n## Options\n\n    subdomains_are_external\n\nboolean  \ndefaults to false  \ndetermines whether subdomains like www.example.com and blog.example.com open in a new window\n\n    additional_internal_sites\n\narray  \ndefaults to empty  \nallows you to specify additional domains that should open in the same window\n\n### Example with options\n\n    $(document).ready(function() {\n        \n        // build options for prepare links\n        var options = {\n          \tsubdomains_are_external : true,\n    \t\tadditional_internal_sites : [\n    \t\t    \"http://github.com\",\n    \t\t    \"http://google.com\"\n    \t\t]\n        };\n\n        // call prepare links with predefined options\n    \t$(\"a\").prepare_links(options);\n    });\n\nLinks for the current domain, github.com, and google.com will open in the current window.  All other links including subdomains will open in a new window.\n\n## Feedback\n\nIf you find a bug,  please write a unit test for it and submit a patch.  You can also raise an issue on [github](http://github.com/leejones/prepare_links).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleejones%2Fprepare_links","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleejones%2Fprepare_links","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleejones%2Fprepare_links/lists"}