Skip to content
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

Custom CSS, AB Customization, ~~UV linking/config fix~~ #79

Merged
merged 4 commits into from
Feb 27, 2023
Merged

Custom CSS, AB Customization, ~~UV linking/config fix~~ #79

merged 4 commits into from
Feb 27, 2023

Conversation

Cattn
Copy link
Member

@Cattn Cattn commented Feb 14, 2023

Not sure if the AB Cloak is working 100%, so if someone could test it out would appreciate. (Probably won't break AB if not?)

I suggest whoever checks this will test the AB Feature beforehand. It should have no issue, but for the sake of it would probably be good to test.

(Sorry for 3 commits lol had some issues)

Not sure if the AB Cloak is working 100%, so if someone could test it out would appreciate. (Probably won't break AB if not?)
Not sure if the AB Cloak is working 100%, so if someone could test it out would appreciate. (Probably won't break AB if not?)
@youngchief-btw
Copy link

LGTM! Ideally we get documentation alongside this soon, right?

@Cattn
Copy link
Member Author

Cattn commented Feb 16, 2023

LGTM! Ideally we get documentation alongside this soon, right?

Yep, The setup for custom themes is pretty specific and interactive, not just paste block of code. But I'll write some docs likely to show where the colors/elements go if names aren't clear enough

@Cattn
Copy link
Member Author

Cattn commented Feb 25, 2023

yo @cohenerickson I think refactoring is done? I don't think this'll have issues, just could u take a look?

@cohenerickson
Copy link
Member

It seems like the link isn't correctly being generated. When navigating to example.com, the iframe loads /service/hvtr%3A-%2Fgxcmrlg.aoo instead of /service/go/hvtr%3A-%2Fgxcmrlg.aoo.

Copy link
Contributor

@3kh0 3kh0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uses my system, so 3kh0 approved

@3kh0
Copy link
Contributor

3kh0 commented Feb 26, 2023

I am referring to the cloak system

@Cattn
Copy link
Member Author

Cattn commented Feb 27, 2023

It seems like the link isn't correctly being generated. When navigating to example.com, the iframe loads /service/hvtr%3A-%2Fgxcmrlg.aoo instead of /service/go/hvtr%3A-%2Fgxcmrlg.aoo.

I think this was an issue before and not with my code, I'll take a look to see

@Cattn
Copy link
Member Author

Cattn commented Feb 27, 2023

uses my system, so 3kh0 approved

What's your system

@GreenyDEV
Copy link
Collaborator

All known bugs need to be fixes before changes are merged, please take a look at what Cohen mentioned.

@Cattn
Copy link
Member Author

Cattn commented Feb 27, 2023

All known bugs need to be fixes before changes are merged, please take a look at what Cohen mentioned.

Alright, will see what's going on here, seems to be unrelated my code, but I will take a crack at it

@GreenyDEV
Copy link
Collaborator

Also make sure the code you edited is the latest code!

@Cattn
Copy link
Member Author

Cattn commented Feb 27, 2023

Also make sure the code you edited is the latest code!

Yes, will do this time lmfao, Should be fine pulling from my branch

@Cattn
Copy link
Member Author

Cattn commented Feb 27, 2023

Ok I think I've identified a fix, but I do not wish to break things, and also it doesn't make much sense.

https://github.com/Cattn/Nebula/blob/main/public/resources/nebulamain.js#L159 At this line, __uv$config.prefix seems to be returning /service/ instead of /service/go/ which I'm not sure why it is. Now maybe it's how I'm testing it locally? Idk for sure.

changing __uv$config.prefix + __uv$config.encodeUrl(url)

to __uv$config.prefix + 'go/' + __uv$config.encodeUrl(url)
obv as a temp change fixed the issue for me that your describing

I think this issue is deeper than what I'm seeing

Ignore all this please look below at my messages/commit

@cohenerickson

@Nailington
Copy link
Contributor

After some slow cross-referencing, https://github.com/titaniumnetwork-dev/Ultraviolet/blob/main/src/uv.sw.js#L34 can be seen with /service/ not /service/go/. Now why this matters is above my pay grade, as all I did was act like an idiot and accidentially found something possibly irrelevant.

@Cattn
Copy link
Member Author

Cattn commented Feb 27, 2023

issue is it's setting the wrong prefix

@cohenerickson could you take care of this? this shouldn't be anything I've done as I didn't even touch how A:B loads

@Cattn
Copy link
Member Author

Cattn commented Feb 27, 2023

36a41cd fixes it, but due to how config is setup the prefix is /service/ and not /service/go

I will be sleeping now

Yes, you were semi-right EV

Update in the morning: 36a41cd did not fix it, I'm not sure what happened as I swear it worked on my machine before I pushed

@Nailington
Copy link
Contributor

36a41cd fixes it, but due to how config is setup the prefix is /service/ and not /service/go

I will be sleeping now

Yes, you were semi-right EV

The only thing that confuses me rn is why explicitly @cohenerickson said to make it /service/go/ when it is possible to get it to work otherwise... is there a reason why this was asked? Does the rest of Neb use the /go/ setup? And if you knew it SHOULD have had /go/, how did you know?

@Cattn
Copy link
Member Author

Cattn commented Feb 27, 2023

I'm going to just revert my changes for now until Cohen looks at this thread

This is a Nebula issue outside of my fork/PR (See #84 )

@GreenyDEV
Copy link
Collaborator

we're working on a fix for the service bug

@Cattn Cattn changed the title Custom CSS Feature + AB Cloak Customization Custom CSS, AB Customization, UV linking/config fix Feb 27, 2023
@Cattn Cattn mentioned this pull request Feb 27, 2023
@cohenerickson
Copy link
Member

cohenerickson commented Feb 27, 2023

990225e

This is not true, the official documentation for the ultraviolet library explicitly states that it can be done, I can fix this later today but not for a few more hours. It is simply just an issue with the order express is handling static routes.

The reason this wasn't caught by me in the beginning was due to the inconsistencies in the codebase by either explicitly stating the prefix as a string or using the _uv$config.prefix variable.

@cohenerickson
Copy link
Member

Please resolve conflicts with 059526d

@Cattn
Copy link
Member Author

Cattn commented Feb 27, 2023

Please resolve conflicts with 059526d

Will do

@Cattn
Copy link
Member Author

Cattn commented Feb 27, 2023

Fixed, merging now!

@Cattn Cattn merged commit c44622d into NebulaServices:main Feb 27, 2023
@Cattn Cattn changed the title Custom CSS, AB Customization, UV linking/config fix Custom CSS, AB Customization, ~~UV linking/config fix~~ Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants