0
3

[–] Citizen 0 points 3 points (+3|-0) ago 

It would need to be done client side, as the ddos protection screen is static due to its very nature. It could be done with javascript & cookies or by installing something on your browser.

0
0

[–] ChillyHellion [S] ago 

I figured it might be a technology limitation. I'm not sure how much time they'd want to invest in a cosmetic change anyway, since the DDOS thing is probably only a temporary measure. It would add visual cohesion though.

0
2

[–] Citizen 0 points 2 points (+2|-0) ago  (edited ago)

Here's how @atko could set it up for everyone on voat:

https://support.cloudflare.com/hc/en-us/articles/200170196-I-am-under-DDoS-attack-what-do-I-do-

All paid customers can fully modify the HTML on the challenge page and the I'm Under Attack mode page. The challenge page is shown to potentially suspicious visitors who meet the CloudFlare Basic Security threshold you set. If the CloudFlare service determines that a visitor to your website might be potentially malicious, then the visitor would be served a ‘challenge’ page, requiring them to enter in a CAPTCHA. If the visitor passes the CAPTCHA test, then they would continue onto your website.

To customize your challenge page, go to: Settings > Custom Errors.


We already have a cookie with the theme. So, add some javascript on the challenge page that tests for this cookie, and modify the styles accordingly:

if ((document.cookie.length>0) && (document.cookie.indexOf("theme=dark") != -1))
{
    document.body.style.background = "#333";
    document.body.style.color = "#dfdfdf";
    document.getElementById("header").style.background = "#333";
    document.getElementById("header-container").style.background = "#333";
    document.getElementById("header-container").style.borderBottom  = "1px solid #222";
    document.getElementById("header-container").style.borderTop = "1px solid #222";
    document.getElementsByClassName("panel")[0].style.background = "#333";
    document.getElementsByClassName("panel-heading")[0].style.background = "#333";
    document.getElementsByClassName("panel-title")[0].style.background = "#333";
    document.getElementsByClassName("panel-title")[0].style.color = "#dfdfdf";
    document.getElementsByClassName("panel-body")[0].style.background = "#333";
    document.getElementsByClassName("panel-body")[0].style.border = "1px solid #222";
}

Insert the code just before the closing head tag so the CSS will be modified before the page is rendered. Otherwise you'll still get a flash of daystar mode.


And as an alternative, I've modified the code so that you can install it as a userscript. This means that it'll work even without voat being updated. I haven't actually tested it live, but it should work. It's rather painful to test stuff, not knowing when you'll get the "Checking your bits" thing to actually show up.

You can get it here: https://greasyfork.org/en/scripts/11363-voat-nightwalker-mode

(Oh, all copyright is released into the public domain. This means that you can take it and do whatever the hell you want with it.)

0
1

[–] ChillyHellion [S] 0 points 1 point (+1|-0) ago 

Really cool, nice job!