{"id":15537021,"url":"https://github.com/nikolas/js-stalker","last_synced_at":"2025-04-15T18:25:41.190Z","repository":{"id":9494206,"uuid":"11385528","full_name":"nikolas/js-stalker","owner":"nikolas","description":"Block people by IP address, city, or proxy, in JavaScript","archived":false,"fork":false,"pushed_at":"2013-07-15T17:19:34.000Z","size":168,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-20T14:42:30.306Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/nikolas.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":"2013-07-13T08:47:44.000Z","updated_at":"2023-09-08T16:40:39.000Z","dependencies_parsed_at":"2022-08-29T00:20:20.126Z","dependency_job_id":null,"html_url":"https://github.com/nikolas/js-stalker","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/nikolas%2Fjs-stalker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolas%2Fjs-stalker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolas%2Fjs-stalker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolas%2Fjs-stalker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikolas","download_url":"https://codeload.github.com/nikolas/js-stalker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249127495,"owners_count":21216988,"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-10-02T11:54:33.372Z","updated_at":"2025-04-15T18:25:41.172Z","avatar_url":"https://github.com/nikolas.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"js-stalker\n==========\nIf someone is stalking you on your website, here's what you do. This method is\nall in JavaScript so it works on Tumblr. Of course.. that means that for a\nstalker to get around it, they can just disable JavaScript in their browser.\nTo prevent that, hide the `\u003cbody\u003e` element with CSS, and show that element when\nJavaScript is loaded.\n\n### How to block people on Tumblr ###\nClick \"Edit HTML\" in the theme customizer. Paste this code after the `\u003chead\u003e` tag:\n```html\n\u003c!-- js-stalker code -- https://github.com/nikolas/js-stalker --\u003e\n\u003cscript\u003e\n// Configure the blocker here:\nvar stalker = {\n  forward: 'http://example.org/stop-stalking-me!!!!',\n  ip_addresses: ['127.0.0.1'],\n  whitelist_ip_addresses: ['127.0.0.2'],\n  cities: ['Seattle', 'Olympia'],\n  states: ['OR'],\n  proxies: true\n};\n\u003c/script\u003e\n\n\u003cscript src=\"//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n// stalker.js\nfunction proxyBlock(a){document.URL!=stalker.forward\u0026\u0026\"Y\"==a.proxy\u0026\u0026(window.location=stalker.forward)}\nfunction jsStalkerGet(a){document.URL==stalker.forward||(-1==stalker.ip_addresses.indexOf(a.geoplugin_request)\u0026\u0026-1==stalker.cities.indexOf(a.geoplugin_city)\u0026\u0026-1==stalker.states.indexOf(a.geoplugin_region)||-1!=stalker.whitelist_ip_addresses.indexOf(a.geoplugin_request))||(window.location=stalker.forward);stalker.proxies\u0026\u0026$.ajax({url:\"http://4gods.nl/~nik/proxyblock.php\",type:\"GET\",data:{ip:a.geoplugin_request,format:\"jsonp\"},crossDomain:!0,dataType:\"jsonp\",jsonp:\"cb\",jsonpCallback:\"proxyBlock\"})}\n\u003c/script\u003e\n\u003cscript src=\"http://www.geoplugin.net/json.gp?jsoncallback=jsStalkerGet\" type=\"application/javascript\"\u003e\u003c/script\u003e\n\u003c!-- end js-stalker --\u003e\n```\n\nIf you want to still see who gets caught in the blocker in your StatCounter, make sure the StatCounter code is before the js-stalker code.\n\n### Options ###\n#### Specify the site to forward stalkers to ####\n```javascript\nvar stalker = { forward: 'http://example.org/stop-stalking-me!!!!' };\n```\n\n#### Block their house ####\nIf you want to block them from going to your site at their house, find their IP\naddress with StatCounter - http://statcounter.com/.\n\n```javascript\nvar stalker = { ip_addresses: ['127.0.0.1'] };\n```\n\nAllow certain IP's to get through by putting them in the whitelist:\n```javascript\nvar stalker = { whitelist_ip_addresses: ['127.0.0.2'] };\n```\n\n#### Block their city ####\nTo block anyone in Seattle or Olympia:\n```javascript\nvar stalker = { cities: ['Seattle', 'Olympia'] };\n```\n\n#### Block anonymous proxies ####\njs-stalker can block users that are suspected of using an anonymous proxy like\nTor or hidemyass.com.\n```javascript\nvar stalker = { proxies: true };\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolas%2Fjs-stalker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikolas%2Fjs-stalker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolas%2Fjs-stalker/lists"}