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

feat: Improved UA tag search, cleaned code and removed redundancy #11

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

obfuscated-loop
Copy link
Contributor

@obfuscated-loop obfuscated-loop commented Mar 14, 2024

Hello, just wanted to say thanks for accepting the workflow PR I made, I read your commit message, and you're right - it shouldn't be an issue in the first place but people do not like to read. Cool project though!

This PR improves the way useragent tags are handled I.E Discordbot - I have added the tags to an object where the keys are the source names and the value is an array of different useragent tags (substrings that could appear within the useragent string itself).

This way is better because now it'll be much easier and dynamic to add different sources without constantly redefining new variables. The source is confirmed via substring and included within the embed message.

This PR also includes a basic formatting to improve readability; adequate indenting/spacing and removal of semi-colons which are not needed.

Copy link

vercel bot commented Mar 14, 2024

Someone is attempting to deploy a commit to a Personal Account owned by @lulu5239 on Vercel.

@lulu5239 first needs to authorize it.

@obfuscated-loop
Copy link
Contributor Author

I was thinking, is there really much point in including the page.html page at all? It would be better to just redirect to the GitHub project in my opinion - or even return a 404 status code.

@lulu5239
Copy link
Owner

Discord uses a more normal user-agent when someone views a message a the view-logger (at least in the mobile app), they only use the Discordbot user-agent to see if the page is an HTML page and take data from it. I also don't think there will be more sources for it.
The script was checking for Twitter's user-agent because Guilded uses it.

The page.html is just to inform users who opens the view-logger link that what they've opened was a view-logger, maybe it should have a link to No Text To Speech's video.

@obfuscated-loop
Copy link
Contributor Author

I could definitely think of a few more places where this could be useful - do you know what useragents the other apps use? I noticed that Macintosh one floating around, but are there any variants? Using this object I made, you'll be able to add a 'whitelist' of sorts.

@obfuscated-loop obfuscated-loop marked this pull request as draft March 14, 2024 02:02
@obfuscated-loop
Copy link
Contributor Author

I've converted this PR to a draft for now, please do not close - I will test it with some other platforms and get back to you with results.

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.

2 participants