aboutsummaryrefslogtreecommitdiff
path: root/src/stackexchange-com-fixes/index.json
blob: 961dfc82f32824030263802a4a10a86b21fb27f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// SPDX-License-Identifier: CC0-1.0

// Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
// Available under the terms of Creative Commons Zero v1.0 Universal.

{
    "$schema": "https://hydrilla.koszko.org/schemas/package_source-2.schema.json",
    "source_name": "stackexchange-com-fixes",
    "copyright":  [
	{"file": "report.spdx"},
	{"file": "LICENSES/Apache-2.0.txt"},
	{"file": "LICENSES/CC0-1.0.txt"}
    ],
    "upstream_url": "https://git.koszko.org/hydrilla-fixes-bundle/tree/src/stackexchange-com-fixes",
    "definitions": [{
	"type":         "mapping_and_resource",
	"identifier":   "stack-exchange-fix-cookienotice",
	"long_name":    "Stack Exchange cookie notice fix",
	"version":      [2022, 8, 27],
	"revision":     1,
	"description":  "Make cookie notice on Stack Exchange websites closable without relying on site-served JavaScript.",
	"dependencies": [],
	"scripts":      [{"file": "stack_exchange_cookienotice.js"}],
	"payloads": {
	    // The list of domains can be constructed by going to
	    // https://stackexchange.com/sites and there, on the page, executing:
	    // [...document.querySelector(".grid-view-container").children]
	    //     .filter(n => n.nodeName === "A" && n.href)
	    //     .map(n => n.href)
	    //     .filter(u => !/^https:\/\/[^.]+\.stackexchange.com\/$/.test(u))
	    //
	    // * https://academia.stackexchange.com/questions/182562/results-that-are-too-good-to-be-true-peer-review
	    // * https://stackoverflow.com
	    // * https://superuser.com
	    "https://serverfault.com/***": {
		"identifier": "stack-exchange-fix-cookienotice"
	    },
	    "https://superuser.com/***": {
		"identifier": "stack-exchange-fix-cookienotice"
	    },
	    "https://askubuntu.com/***": {
		"identifier": "stack-exchange-fix-cookienotice"
	    },
	    "https://stackapps.com/***": {
		"identifier": "stack-exchange-fix-cookienotice"
	    },
	    "https://mathoverflow.net/***": {
		"identifier": "stack-exchange-fix-cookienotice"
	    },
	    // Handle stackoverflow.com, ru.stackoverflow.com, and all other
	    // language-specific SO sites. With one pattern.
	    "https://***.stackoverflow.com/***": {
		"identifier": "stack-exchange-fix-cookienotice"
	    },
	    // Finally, handle all the other StackExchange sites.
	    "https://*.stackexchange.com/***": {
		"identifier": "stack-exchange-fix-cookienotice"
	    }
	}
    }, {
	"type":         "mapping_and_resource",
	"identifier":   "meta-stackexchange-com-fix-login-redirect",
	"long_name":    "Stack Exchange login redirect fix",
        "uuid":         "3f006539-f43f-4f71-998a-6a7ce0ebf4b3",
	"version":      [2022, 8, 27],
	"revision":     1,
	"description":  "Make automatic redirect on Stack Exchange login page work without relying on site-served JavaScript.",
	"dependencies": [],
	"scripts":      [{"file": "login-redirect.js"}],
	"payloads": {
	    "https://meta.stackexchange.com/users/login": {
		"identifier": "meta-stackexchange-com-fix-login-redirect"
	    }
	}
    }, {
	"type":              "mapping_and_resource",
	"identifier":        "meta-stackexchange-com-fix-register",
	"long_name":         "Stack Exchange registration fix",
	"uuid":              "e0a00885-bac6-43e8-a8ea-e013f733c8cf",
	"version":           [2022, 8, 27],
	"revision":          1,
	"description":       "Enable registration of a Stack Exchange account without relying on site-served JavaScript.",
	"dependencies":      [{"identifier": "stack-exchange-fix-cookienotice"}, {"identifier": "hacktcha"}],
	"required_mappings": [{"identifier": "meta-stackexchange-com-fix-login-redirect"}, {"identifier": "stack-exchange-fix-cookienotice"}],
	"scripts":           [{"file": "register.js"}],
	"payloads": {
	    // * https://meta.stackexchange.com/users/signup
	    "https://meta.stackexchange.com/users/signup": {
		"identifier": "meta-stackexchange-com-fix-register"
	    }
	}
    }],
    "reuse_generate_spdx_report": true
}