-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from nomandhoni-cs/main
Releasing v0.3.0 [ Stable Release ]
- Loading branch information
Showing
11 changed files
with
308 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Bump version | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.merge_commit_sha }} | ||
fetch-depth: '0' | ||
|
||
- name: Bump version and push tag | ||
uses: anothrNick/github-tag-action@1.64.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
WITH_V: true | ||
PRERELEASE: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We, as contributors and maintainers of the Facebook-QuietFeed project, pledge to foster an open and welcoming environment for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
- Other conduct that could reasonably be considered inappropriate in a professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [alnoman.dhoni@gmail.com](mailto:alnoman.dhoni@gmail.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html). | ||
|
||
For answers to common questions about this code of conduct, see [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Contributing to Facebook-QuietFeed | ||
|
||
Thank you for considering contributing to Facebook-QuietFeed! We welcome your contributions to help us improve the extension and make it even better for our users. | ||
|
||
## Code of Conduct | ||
|
||
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. Please see [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for details. | ||
|
||
## How Can I Contribute? | ||
|
||
### Reporting Bugs | ||
|
||
- **Ensure the bug was not already reported:** Search the GitHub issues to see if someone else has already reported the same bug. | ||
- **Open a new issue:** If you can't find an existing issue, please open a new issue with a clear and descriptive title. Provide as much detail as possible, including steps to reproduce the issue. | ||
|
||
### Suggesting Enhancements | ||
|
||
- **Open a new issue:** Share your ideas for enhancements with a clear and descriptive title. Explain how the enhancement would be valuable to users. | ||
|
||
### Pull Requests | ||
|
||
- Fork the repository and create your branch from `main`. | ||
- If you've added code that should be tested, add tests. | ||
- Ensure the test suite passes by running `npm test`. | ||
- Make sure your code lints by running `npm run lint`. | ||
- Issue that pull request! | ||
|
||
### Development Setup | ||
|
||
1. Clone the repository: `git clone https://github.com/your-username/Facebook-QuietFeed.git` | ||
2. Navigate to the project folder: `cd Facebook-QuietFeed` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Facebook QuietFeed | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,42 @@ | ||
let lastScrollPosition = 0; | ||
if (window.location.href === "https://www.facebook.com/") { | ||
let lastScrollPosition = 0; | ||
|
||
window.addEventListener("scroll", function () { | ||
let currentScrollPosition = window.scrollY; | ||
window.addEventListener("scroll", function () { | ||
let currentScrollPosition = window.scrollY; | ||
|
||
// Check if the user is scrolling down (scrolling away from the top) | ||
if (currentScrollPosition > lastScrollPosition) { | ||
// Check if the user scrolled at least 100px and is scrolling down | ||
if (Math.abs(currentScrollPosition - lastScrollPosition) >= 300) { | ||
hideSuggestedPosts(); | ||
// Check if the user is scrolling down (scrolling away from the top) | ||
if (currentScrollPosition > lastScrollPosition) { | ||
// Check if the user scrolled at least 100px and is scrolling down | ||
if (Math.abs(currentScrollPosition - lastScrollPosition) >= 150) { | ||
hideSuggestedPosts(); | ||
} | ||
} | ||
} | ||
lastScrollPosition = currentScrollPosition; | ||
}); | ||
lastScrollPosition = currentScrollPosition; | ||
}); | ||
|
||
function hideSuggestedPosts() { | ||
console.log("Runed"); | ||
let allElements = document.querySelectorAll( | ||
'span.x193iq5w.xeuugli.x13faqbe.x1vvkbs.x1xmvt09.x1lliihq.x1s928wv.xhkezso.x1gmr53x.x1cpjm7i.x1fgarty.x1943h6x.xudqn12.x3x7a5m.x6prxxf.xvq8zen.xo1l8bm.xi81zsa[dir="auto"]' | ||
); | ||
let suggestedElements = []; | ||
function hideSuggestedPosts() { | ||
console.log("Runed"); | ||
let allElements = document.querySelectorAll( | ||
'span.x193iq5w.xeuugli.x13faqbe.x1vvkbs.x1xmvt09.x1lliihq.x1s928wv.xhkezso.x1gmr53x.x1cpjm7i.x1fgarty.x1943h6x.xudqn12.x3x7a5m.x6prxxf.xvq8zen.xo1l8bm.xi81zsa[dir="auto"]' | ||
); | ||
let suggestedElements = []; | ||
|
||
for (let i = 0; i < allElements.length; i++) { | ||
let element = allElements[i]; | ||
if (element.textContent === "Suggested for you") { | ||
suggestedElements.push(element); | ||
for (let i = 0; i < allElements.length; i++) { | ||
let element = allElements[i]; | ||
if (element.textContent === "Suggested for you") { | ||
suggestedElements.push(element); | ||
} | ||
} | ||
} | ||
|
||
suggestedElements.forEach(function (spanElement) { | ||
let parentElement = spanElement.parentElement; | ||
while (parentElement) { | ||
if (parentElement.classList.contains("x1lliihq")) { | ||
parentElement.remove(); | ||
break; | ||
suggestedElements.forEach(function (spanElement) { | ||
let parentElement = spanElement.parentElement; | ||
while (parentElement) { | ||
if (parentElement.classList.contains("x1lliihq")) { | ||
parentElement.remove(); | ||
break; | ||
} | ||
parentElement = parentElement.parentElement; | ||
} | ||
parentElement = parentElement.parentElement; | ||
} | ||
}); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Fetch the version number from the GitHub API | ||
fetch("https://api.github.com/repos/nomandhoni-cs/Facebook-QuietFeed/tags") | ||
.then((response) => response.json()) | ||
.then((tags) => { | ||
if (tags && tags.length > 0) { | ||
const versionNumber = tags[0].name; | ||
document.getElementById( | ||
"version" | ||
).textContent = `Version: ${versionNumber}`; | ||
} | ||
}) | ||
.catch((error) => { | ||
console.error("Error fetching version:", error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters