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

refacto/feature/fix: Content.js refacto and Job section #72

Merged
merged 3 commits into from
Dec 15, 2024

Conversation

valdoryu
Copy link
Collaborator

@valdoryu valdoryu commented Dec 5, 2024

PR that refacto content.js code and handle a new job section with tag filtering & options to hide annoying sections

  • Refactor content.js
    - Code splitting for content.js in multiple modules: feed, general, jobs, misc & message. Utils & constants files are used to share code
    - Improved unhiding handling in every features
    - Made hideByClassName more aggressive to tackle LinkedIn "ads protection" that prevents us from hiding some ads & premium prompts

  • Job section
    - Filter jobs by keyword
    - Hide AI button
    - Hide Job Guidance section
    - Hide Promoted Jobs

  • Broken features fixed
    - select message for deletion
    - ads hiding
    - videos hiding
    - premium hiding
    - unhiding on specific options
    - unfollow all option
    - Hide post by age

For code splitting:

  • content.js dynamically import features/index.js so it can use ES6 imports
  • In index.js, we setup event handler to start the logic
  • In features/*.js files, we export functions associated with each tab (general, misc, job & feed) or features like messages
  • In utils, we put all shared functions
  • In constants, we put all shared constants

@valdoryu valdoryu added bug Something isn't working enhancement New feature or request labels Dec 5, 2024
@valdoryu valdoryu force-pushed the feature/job-filters branch 3 times, most recently from bd6e734 to 5e98b38 Compare December 6, 2024 11:31
@valdoryu valdoryu force-pushed the feature/job-filters branch from 5e98b38 to 6093cee Compare December 6, 2024 11:34
@njelich
Copy link
Owner

njelich commented Dec 7, 2024

Ready for merge?

@valdoryu
Copy link
Collaborator Author

valdoryu commented Dec 8, 2024

have you tried it ? I'll be more confident

@valdoryu
Copy link
Collaborator Author

Ok you can merge, I did a loooot of tests

@njelich njelich merged commit 2b31654 into main Dec 15, 2024
2 checks passed
@njelich njelich deleted the feature/job-filters branch December 15, 2024 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants