4chan-x icon indicating copy to clipboard operation
4chan-x copied to clipboard

Make theme selector setting work without cookies / JS (was: theme tomorrow not applied to header bar nor th ewindows of the options)

Open Janaue opened this issue 9 years ago • 6 comments

I like the theme titled tomorrow and I just copy-paste the CSS from http://s.4cdn.org/css/tomorrow.614.css into the field ''Custom CSS'' of 4chan-x.

ss 2015-09-17 at 11 26 59 ss 2015-09-17 at 11 27 11

The question is how to get the theme tomorrow applied to the content form 4chan AND the content displayed by 4chan-x without selecting the theme on each board.

When I have no previous cookies from 4chan, The theme is applied to the proper elements of 4chan, but not to the elements of 4chan-x.

The windows of 4chan-x remain purple and I must select the theme tomorrow on 4chan itself to get the theme tomorrow applied to the elements of 4chan-x

Also, by default, not all boards use the same theme. So for instance:

/tv/ uses Yotsuba B /r9k/ uses Yotsuba

and I must select the theme tomorrow on each of those boards to get the theme tomorrow applied to the elements of 4chan-x

Janaue avatar Sep 17 '15 09:09 Janaue

4chan X goes off the setting of the theme selector, which is part of 4chan's native code and therefore has its setting stored in cookies. It would probably be good to have 4chan X store this setting in Greasemonkey / Chrome extension storage. Until then, a workaround is to add the CSS from

https://github.com/ccd0/4chan-x/blob/master/src/General/css/tomorrow.css

with all instances of :root.tomorrow removed.

Update: Link is now https://github.com/ccd0/4chan-x/blob/master/src/css/tomorrow.css

ccd0 avatar Sep 28 '15 04:09 ccd0

From #783:

Submitter: analmaous Email: [email protected] so o copied the source code from the tommorow theme and pasted it into custom css so i have always the tommrow theme, because i browse with disabled cookies and now is the problem that the interface of 4chan x is light blue and you cant really see anything also i dont know why everytime i refresh it scrolls back to the top, even tho i have those update scroll down enabled

ccd0 avatar Feb 19 '16 11:02 ccd0

deadman3000, https://github.com/ccd0/4chan-x/issues/843:

So when can we expect 4chan X to become style aware? Unless I switch back to the default user style I can't read this for ***t

http://i.imgur.com/jslq4mt.jpg

This is a request of sorts. Thanks for the constant updates though. You are doing Zod's work.

gregBurgers, https://github.com/ccd0/4chan-x/issues/843#issuecomment-213662816:

I get the same if I disable 4chan .css's from loading using uMatrix and paste the tomorrow theme .css in the 4chan-x custom CSS box.

ccd0 avatar Jul 10 '16 01:07 ccd0

I know this is an old thread, but I just came up on this issue. The previous workaround didn't work, so what I ended up doing was creating a userscript with the following code:

var style = document.getElementById("styleSelector");
style.value = "Tomorrow";
style.dispatchEvent(new Event("change"));

This sets the theme to "Tomorrow", change, replace the string on the 2nd line with your desired theme.

matoro avatar Mar 13 '18 19:03 matoro

Requested again: #2683 #2865

ccd0 avatar Jan 14 '21 07:01 ccd0

EZPZ workaround for those still having issues: https://gist.github.com/ovrsr/1e96daf1eea8f609e3a1a4a0f5a6fa79

ovrsr avatar Jan 15 '22 16:01 ovrsr