Skip to content

Commit 70e9900

Browse files
committed
Add eslint and prettier and extract out snippets of vendor HTML
1 parent a9eb82a commit 70e9900

9 files changed

+4320
-1490
lines changed

.editorconfig

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
9+
indent_style = space
10+
indent_size = 2
11+
end_of_line = lf
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true
15+
16+
[*.md]
17+
trim_trailing_whitespace = true
18+
19+
[*.json]
20+
indent_size = 2
21+
22+
[*.{html,js,md}]
23+
block_comment_start = /**
24+
block_comment = *
25+
block_comment_end = */

eslint.config.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import globals from "globals";
2+
import stylistic from "@stylistic/eslint-plugin";
3+
4+
export default [
5+
{
6+
languageOptions: { globals: globals.node },
7+
plugins: {
8+
"@stylistic": stylistic,
9+
},
10+
rules: {
11+
indent: ["error", 2],
12+
"@stylistic/indent": ["error", 2],
13+
"@stylistic/no-tabs": ["error"],
14+
},
15+
},
16+
];

html.js

+351-406
Large diffs are not rendered by default.

html/about.snippet.html

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<div class="display-contents">
2+
<details>
3+
<summary>About</summary>
4+
5+
<p>
6+
RCVerse is a tool for all Recursers, in-batch and alum, remote and in-hub.
7+
</p>
8+
9+
<p>
10+
We want to connect. We want tools to help connect us. We know how to build
11+
them. Let's build them!
12+
</p>
13+
14+
<p>
15+
The lofty, long term goal of RCVerse is to be open source, to be a
16+
website, to be a canvas for the creativity of RCers, to be a practice
17+
ground for creative web development, to be a space for trying out novel
18+
collaborative tools.
19+
</p>
20+
21+
<p>
22+
The more practical short-term goal for this site is to be the first place
23+
RCers look when they sign on in the morning, to see what's going on, both
24+
virtually and physically. To do this, we'll have to keep making it more
25+
useful over time, and removing any friction which keeps it being as useful
26+
as it can be.
27+
</p>
28+
29+
<p>
30+
To throw your idea at the project, make a PR to
31+
<a href="https://github.com/reedspool/rc-verse"
32+
>the source code repository</a
33+
>. Or you could slap your thoughts on the shared
34+
<a
35+
href="https://docs.google.com/document/d/1tLA_BjwM5k93WsMvNKT58kDb4Ksa9S6TFvGMAuK6Ldk/edit#heading=h.8rrvaio0w6r3"
36+
>google doc</a
37+
>, or message the
38+
<a
39+
href="https://recurse.zulipchat.com/#narrow/stream/18926-help/topic/Reed's.20Impossible.20Day.3A.20Virtual.20RC.20meets.20MySpace"
40+
>Zulip thread</a
41+
>, or message Reed Spool (W2'24) directly.
42+
</p>
43+
44+
<p>
45+
The site is now open source! Check it out on
46+
<a href="https://github.com/reedspool/rc-verse">GitHub</a>.
47+
</p>
48+
</details>
49+
<details>
50+
<summary>Usage</summary>
51+
52+
<p>
53+
To view this page without any customizations active, add the query
54+
parameter <code>?basic</code> or <a href="/?basic">click here</a>.
55+
</p>
56+
57+
<p>
58+
Normally, the rooms on the page are sorted in order of most participants
59+
to least. To disable sorting and use a roughly alphebetical, stable room
60+
order, add the query parameter <code>?sort=none</code> or
61+
<a href="/?sort=none">click here</a>.
62+
</p>
63+
64+
<p>
65+
To combine URL parameters, combine them in any order with a
66+
<code>&</code> (ampersand) between them, and only one
67+
<code>?</code> (question mark) at the start. E.g.
68+
<code>?basic&sort=none</code>
69+
</p>
70+
</details>
71+
<details>
72+
<summary>⚠ XSS vulnerability</summary>
73+
74+
<p>
75+
There's a new section named "Custom Code" at the bottom of the page. All
76+
room notes are now properly HTML escaped.
77+
</p>
78+
79+
<p>
80+
This site has a XSS vulnerability. That means you can inject code which
81+
will be run when other people load the page in their browser. Don't know
82+
what that means? See if you can figure it out. Google's your friend. Ask
83+
other recursers. Poke around.
84+
</p>
85+
86+
<p>
87+
You can inject CSS with a <code>style</code> tag or JavaScript with a
88+
<code>script</code> tag.
89+
</p>
90+
91+
<p>
92+
Please be kind. Do not use blocking JS (like <code>alert</code>) or CSS
93+
which makes the page (totally) unreadable. If you're writing a loop, maybe
94+
test that out on a test HTML page first so that you don't crash this page
95+
for others.
96+
</p>
97+
98+
<p>
99+
Currently
100+
<a
101+
href="https://recurse.zulipchat.com/#narrow/stream/18926-help/topic/Reed's.20Impossible.20Day.3A.20Virtual.20RC.20meets.20MySpace/near/426768844"
102+
>
103+
custom code is ephemeral</a
104+
>. Changes are likely to disappear any time. So if you make a change you
105+
like, take a screenshot and post your code in the zulip thread! Later, you
106+
or someone else can reapply the change.
107+
</p>
108+
109+
<p>
110+
Made something you think should be permanent?
111+
<a href="https://github.com/reedspool/rc-verse">Make a PR!</a>
112+
</p>
113+
</details>
114+
</div>

html/mixpanel.snippet.html

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<script type="text/javascript">
2+
(function (f, b) {
3+
if (!b.__SV) {
4+
var e, g, i, h;
5+
window.mixpanel = b;
6+
b._i = [];
7+
b.init = function (e, f, c) {
8+
function g(a, d) {
9+
var b = d.split(".");
10+
2 == b.length && ((a = a[b[0]]), (d = b[1]));
11+
a[d] = function () {
12+
a.push([d].concat(Array.prototype.slice.call(arguments, 0)));
13+
};
14+
}
15+
var a = b;
16+
"undefined" !== typeof c ? (a = b[c] = []) : (c = "mixpanel");
17+
a.people = a.people || [];
18+
a.toString = function (a) {
19+
var d = "mixpanel";
20+
"mixpanel" !== c && (d += "." + c);
21+
a || (d += " (stub)");
22+
return d;
23+
};
24+
a.people.toString = function () {
25+
return a.toString(1) + ".people (stub)";
26+
};
27+
i =
28+
"disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(
29+
" ",
30+
);
31+
for (h = 0; h < i.length; h++) g(a, i[h]);
32+
var j = "set set_once union unset remove delete".split(" ");
33+
a.get_group = function () {
34+
function b(c) {
35+
d[c] = function () {
36+
call2_args = arguments;
37+
call2 = [c].concat(Array.prototype.slice.call(call2_args, 0));
38+
a.push([e, call2]);
39+
};
40+
}
41+
for (
42+
var d = {},
43+
e = ["get_group"].concat(
44+
Array.prototype.slice.call(arguments, 0),
45+
),
46+
c = 0;
47+
c < j.length;
48+
c++
49+
)
50+
b(j[c]);
51+
return d;
52+
};
53+
b._i.push([e, f, c]);
54+
};
55+
b.__SV = 1.2;
56+
e = f.createElement("script");
57+
e.type = "text/javascript";
58+
e.async = !0;
59+
e.src =
60+
"undefined" !== typeof MIXPANEL_CUSTOM_LIB_URL
61+
? MIXPANEL_CUSTOM_LIB_URL
62+
: "file:" === f.location.protocol &&
63+
"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)
64+
? "https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js"
65+
: "//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";
66+
g = f.getElementsByTagName("script")[0];
67+
g.parentNode.insertBefore(e, g);
68+
}
69+
})(document, window.mixpanel || []);
70+
</script>

0 commit comments

Comments
 (0)