-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not playing friendly with Oneechan nor Sounds #43
Comments
Now that XT doesn't include all of font awesome, this is expected. It can be fixed with some custom CSS: #28 (comment)
4chan Sounds Player has known issues on XT: #36. This might be part of that.
Can be fixed with adding
Weird, mine doesn't look like that. Midnight Caek (is that what you're using?):
I would say this is a flaw in oneechans "Remove Background" option. The QR dialog has a background without oneechan, and by default "Remove Background" isn't enabled. |
Yeh, Zixa the homie and Midnight Caek much more appealing on dark mode accustomed eyes than Appchan.
Fair enough, I might look into making the sounds script more dynamic with theme interaction. Probably adding certain classes might just naturally apply the proper colorations.
My bad, never had to do it before because nothing escaped the input boxes before now so I forgot I had that was an option I turned on.
I understand where you're coming from, but also the lack of a clear separation between the updater timer and the stats is uglier imo.
That's a very inelegant solution to something that works by default on X, I assumed by the issue being closed it meant that you implemented into the code rather than just left it for people to fix themselves, why not just bake it in? Updated OP checkboxes. |
The custom CSS supplied doesn't use Font Awesome, they're unicode symbols/svg. My point was why not just add that custom CSS into your code rather than requiring people to add custom CSS separately. |
The new CSS I wrote uses the SVG from the same version of Font Awesome that the other icons XT use. The previous CSS from the other issue is just a unicode character as that was what was being used before being switched. Unfortunately, SVGs that are URL-encoded in CSS do not follow/retain the In 4chan X before, ccd0 had included the entirety of Font Awesome (4.6 mind you, so an old version) in the CSS. So, for example, even though you would never see the reddit logo, if you gave anything the class Other userscripts took this to their advantage and "hooked" into it so they did not have to include separate icons themselves and were following the "4chan X standard" (since the majority of users have it installed in addition to OneeChan and sounds player, amongst others). Now in XT, Font Awesome as it was has been removed. This means any external userscripts that used to rely on "the Font Awesome workaround" would no longer "function as intended" because the "exploit" was removed. Recently in 2.7, Tako has added back Font Awesome (latest version) for specific icons, as inline SVG rather than as the web font. But again, it's only for specific icons, and the rest are unicode still. The exclusion of the entire Font Awesome webfont saves 25KB, you could argue that gets saved in cache somewhere in some places and in other cases would need to load EVERY page load - when only 20 of those 600 icons are actually used. "Big" time and resource waste. In the same way, no point to include a "fix" for OneeChan or sounds player which everyone would need to load every time but might only affect a small percentage of users. XT is no where near as widely used as X is. Interestingly, sounds player actually embeds (the old) Font Awesome SVGs for all other iconography in the UI but chose to skip it for the header shortcut. If you're having your own version, you could just grab the SVG for the music icon and add it instead. Then it wouldn't matter if 4chan X or XT is installed, everyone would still see the icon (so long as you drop the Can't talk much about OneeChan as it hasn't been meaningly been updated for years and uses pretty legacy JS for something that can pretty much be done in a single userstyle and vanilla CSS nowadays. If 4chan X/XT 3.0 rewrote the entire page to use But, that's my opinion. |
That's my colour theme from my 2009 userstyle "3 Shades of 4chan"! Zixaphir added it as a theme to App/OneeChan.
Honestly, their way of doing it is great. I'd imagine the issue comes when the script runs - if it runs before the CSS from OneeChan is applied and it goes to create an element, it would be the Yotsuba/B theme. I'd add some sort of
Yeah, I went into a fair bit of digging with this: I'll play around with it on the weekend if I get a chance.
Oh wow, I didn't even notice because I was looking at the parent anchor tags with the IDs. Let me get back to you on that one.
And without actually delving in: Would it break a few things? Maybe. Does that mean those that are using XT need to update what they're using? Yes. I know I have a normalize+reboot for In that case I can use
Reset still makes sense. I think either term works. |
Thank you for your service, I've been using it since it was added.
Above my code skill, but I think I have a simple solution. |
Released with 2.7.1. |
Whoops, didn't mean to close this entire issue from the partial fix. |
I decided to try my own variation of the CSS that Saxamaphone posted a while ago, though there isn't much of a difference besides cutting a few lines and changing the icons:
Now my question is, would it be possible to apply different CSS rules for different boards, specifically between SFW and NSFW boards? I still use OneeChan despite its age because of its theming capabilities and that specific feature, and the "fill" property can obviously only apply to one of the two sites at a time. |
@Yaanu So, for SFW boards: :root.fourchan-xt.shortcut-icons.yotsuba-b #header-bar .fa-gears::before {
color: BLUE;
} and then for NSFW :root.fourchan-xt.shortcut-icons.yotsuba #header-bar .fa-gears::before {
color: RED;
} But obviously make whatever changes you need to make properly. The reason it doesn't work is SVGs inserted with data URI in CSS don't follow |
@saxamaphone69 |
@Yaanu If you only frequent several boards, and don't care if it doesn't look nice on the occasion you venture outside your usual boards, you could do: :root.fourchan-xt.shortcut-icons.yotsuba :is(.board_pol, .board_b) #header-bar .fa-gears::before {
color: RED;
} and then :root.fourchan-xt.shortcut-icons.yotsuba :is(.board_g, .board_v) #header-bar .fa-gears::before {
color: BLUE;
} and if you ever need to really override something, try an Though, admittedly, having 4chan XT add a |
Hit the "Edit" button on the theme on Oneechan, use that custom css box to add your fill colors. |
@vampiricwulf @saxamaphone69 |
Nah, no thanks necessary, instead I apologize, I woulda helped you within the hour of your first message if I hadn't missed the part after the code block. Oneechan needs a modern code rewrite as well, but no one really has the time nor interest to do that. It's funny to see how many posters still don't even use 4chanX. I personally can't live without X and Oneechan. Nothing feels right without them. |
I've dug out my old fork of Oneechan and added basic support for XT, which should fix the two issues listed in the OP. I don't know if I'll be able to fix any issues at the moment, but let me know if it works for you and any other feedback.
Switching from px to em sizing might work, with the added benefit of being able to resize with changes to the font size. With some poking around, I believe these are the optimal values to match the current sizes for the icons: #header-bar .menu-button i {
border-top: .45em solid;
border-right: .3em solid transparent;
border-left: .3em solid transparent;
margin: .3em .16em;
}
:root.shortcut-icons #shortcuts .shortcut {
height: 1em;
}
svg.icon {
height: 1em;
} |
While I get the "updated to version 5.7.0" notification, I don't see any settings menu nor any actual theme applied. Also your OneeChan is branched off an older version, the one currently being used by most is: https://github.com/KevinParnell/OneeChan |
I opted not to use that branch because it's honestly a mess. Many of the changes are done directly to the user.js file instead of in /src, and like 90% of them are adding and removing mascots, with the remaining 10% fixing problems that came up because of all the messing around with mascots. I'll likely make some pull requests soon to clean up that mess and port over my changes once I can confirm things work. In the meantime, I've ported over the mascot fixes to my fork, since I think that's why it's breaking when updating. Give it an update and see if it works now. |
Yep, that works! Thank you~ Are you going to add a fix for the "Sounds" svg as well, or should I just leave in the custom CSS that adds it? |
I've submitted a pull request to your fork of sounds player, which should add the SVG icon from the CSS above to the header. I did a build to test it out, and it seems to be working. That said, I'm having some issues between sounds player and XT specifically. It seems to be breaking somewhere in reading the replies, and when it does, the icon fails to embed in the header. It's hard to nail down, since it's very inconsistant and there's no error in the console. The sound player also still works in this state, and some detected sound filenames will still have a play button embed next to them, but somewhere around 30-50 replies, the script seems to stop. This behavior is only happening in XT, as the script seems to complete both with just Sounds and Sounds + X. |
My bad, didn't notice the notification. Copying over what I said there:
|
Got ya. I'm nowhere near compent enough in Javascript to really figure it out, but going by what you said and looking at the code for sounds player, it seems like XT might be handling "4chanXInitFinished" differently enough from X that it takes longer to trigger in larger threads. Setting the timeout value higher in sounds player for Edit: Wrong value, that's a function call, not the timeout |
Well, with that, everything is checked off! Thank you all! |
For reference, running:
https://github.com/vampiricwulf/4chan-sounds-player (structurally the same as the OG script, just with warosu fixes and shorthand for catbox links)
https://github.com/KevinParnell/OneeChan
List of observed issues:
nor Oneechanhave their icons buttons.The text was updated successfully, but these errors were encountered: