Compare commits

..

No commits in common. "f9190a87730b17f956dfa9665f4270fafc68d1b2" and "ae9280af686946711492fab48571ecfde304ca6b" have entirely different histories.

3 changed files with 4 additions and 28 deletions

View File

@ -2,4 +2,4 @@
this is the code for [blackout.tilde.town](https://blackout.tilde.town).
the database that powers this was made using [gutchunk](https://git.tilde.town/vilmibm/gutchunk).
the database that powers this was made using [gutchunk](https://git.tilde.town/~vilmibm/gutchunk).

View File

@ -50,9 +50,6 @@ func main() {
randMax := big.NewInt(maxID)
spaceRE := regexp.MustCompile(`[\t\v\f\r ]+`)
r.HEAD("/", func(c *gin.Context) {
c.String(http.StatusOK, "")
})
r.GET("/", func(c *gin.Context) {
db, err := connectDB()
@ -61,7 +58,6 @@ func main() {
c.String(http.StatusInternalServerError, "oh no.")
return
}
defer db.Close()
id, err := rand.Int(rand.Reader, randMax)
if err != nil {

View File

@ -7,7 +7,6 @@
<style>
body {
background-color: black;
color: black;
}
.rainbow {
animation-name: rainbow;
@ -64,10 +63,6 @@
background-color: white;
}
#paper span.black:hover {
background-color: grey;
}
#aboutToggle {
color: white;
font-weight: bold;
@ -102,7 +97,7 @@
-->
<center>
<p>
<button id="copy">copy text to clipboard</button>
<button id="copy">copy to clipboard</button>
</p>
<p>
<a id="aboutToggle" href="">ABOUT</a>
@ -117,9 +112,6 @@
<p>
IT IS <strong>#{{.ID}}</strong> OUT OF <strong>{{.MaxID}}</strong> POSSIBLE TEXT CHUNKS. RELOAD FOR ANOTHER.
</p>
<p>
THIS IS A <a href="https://tilde.town/~vilmibm/blog/#blackout">BLOG POST</a>. THIS IS <a href="https://git.tilde.town/vilmibm/gutchunk">SOURCE</a> <a href="https://git.tilde.town/vilmibm/blackout">CODE</a>.
</p>
<p>
THIS IS A PROJECT BY <a href="https://tilde.town/~vilmibm">~VILMIBM</a>.
</p>
@ -138,18 +130,6 @@
let toCopy = "";
document.querySelectorAll("#paper span").forEach(span => {
let guts = span.innerHTML;
if (!span.classList.contains("black")) {
toCopy += guts.trim()+" ";
}
if (guts.includes("\n") && toCopy[toCopy.length-1] != "\n") {
toCopy += "\n"
}
/*
// I think this method of converting to plaintext is interesting but
// it's not very practical--it's way too many characters to
// realistically put in a toot or alt text or similar. I may add a
// "copy wide text" button that re-introduces this behavior.
let out = "";
if (span.classList.contains("black")) {
for (let i = 0; i < guts.length; i++) {
@ -162,8 +142,8 @@
} else {
out = guts;
}
toCopy += out
*/
toCopy += out;
});
navigator.clipboard.writeText(toCopy).then(() => {