tangled
alpha
login
or
join now
hotsocket.fyi
/
hello-dolly
3
fork
atom
Userscript that puts lines from "Hello, Dolly!" in the top bar of Tangled.
3
fork
atom
overview
issues
pulls
pipelines
remove extra debug logging
hotsocket.fyi
4 months ago
eb95e4e0
192cd439
+1
-2
1 changed file
expand all
collapse all
unified
split
hello.user.js
+1
-2
hello.user.js
···
5
5
// @downloadURL https://tangled.org/did:plc:jlplwn5pi4dqrls7i6dx2me7/hello-dolly/raw/main/hello.user.js
6
6
// @match *://tangled.org/*
7
7
// @match *://tangled.sh/*
8
8
-
// @version 1.0
8
8
+
// @version 1.1
9
9
// ==/UserScript==
10
10
11
11
function hello_dolly_get_lyric() {
···
41
41
// Here we split it into lines.
42
42
const lines = lyrics.split("\n");
43
43
44
44
-
console.log(lines);
45
44
// And then randomly choose a line.
46
45
return lines[Math.max(0, Math.round((Math.random()*lines.length) - 1))];
47
46
}