Skip to content

Commit

Permalink
feat(): new initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
njelich committed Jul 25, 2021
0 parents commit c832a3c
Show file tree
Hide file tree
Showing 27 changed files with 13,902 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

ko_fi: njelich
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
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.

**Environment (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
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.

**Additional context**
Add any other context or screenshots about the feature request here.
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI / CD

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
createRelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Gets semantic release info
id: semantic_release_info
uses: njelich/action-semantic-release-info@v1.2
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Update version in manifest.json
if: steps.semantic_release_info.outputs.version != ''
run: bash .github/workflows/updateVersionInManifest.sh ${{ steps.semantic_release_info.outputs.version }}

- name: Commit files
if: steps.semantic_release_info.outputs.version != ''
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git commit -m "docs(): bumping release ${{ steps.semantic_release_info.outputs.git_tag }}"
git tag ${{ steps.semantic_release_info.outputs.git_tag }}
- name: Push changes
uses: ad-m/github-push-action@v0.6.0
if: steps.semantic_release_info.outputs.version != ''
with:
branch: ${{ github.ref }}
github_token: ${{ github.token }}
tags: true

- name: Archive extension files
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: 'LinkOff.zip'
exclusions: '*.git* /*node_modules/* /*assets/* README.md package*'

- name: Create release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.semantic_release_info.outputs.git_tag }}
name: ${{ steps.semantic_release_info.outputs.git_tag }}
body: ${{ steps.semantic_release_info.outputs.notes }}
artifacts: "LinkOff.zip"
token: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint

on:
push:
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Lint Codebase
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .github/workflows/updateVersionInManifest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

contents="$(jq --arg v "$1" '.version = $v' manifest.json)" && echo "${contents}" > manifest.json
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.DS_Store
/.vscode
node_modules
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Noah Jelich

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.
148 changes: 148 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# LinkOff - LinkedIn Filter and Customizer 🧹

LinkOff cleans and customizes LinkedIn. It filters out the junk, leaving behind the posts and page elements that you want to see.

<p>
<img alt="Chrome Web Store" src="https://img.shields.io/chrome-web-store/users/maanaljajdhhnllllmhmiiboodmoffon?label=Chrome%20users">
<img alt="Chrome Web Store" src="https://img.shields.io/chrome-web-store/rating/maanaljajdhhnllllmhmiiboodmoffon">
<img alt="Mozilla Add-on" src="https://img.shields.io/amo/users/linkoff-clean-your-feed?label=Firefox%20users">
<img alt="Mozilla Add-on" src="https://img.shields.io/amo/rating/linkoff-clean-your-feed">
<img alt="GitHub manifest version" src="https://img.shields.io/github/manifest-json/v/njelich/linkoff">
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/njelich/linkoff">
<img alt="GitHub" src="https://img.shields.io/github/license/njelich/linkoff">
<p/>

[![Preview LinkOff](https://j.gifs.com/4QE44n.gif)](https://www.youtube.com/watch?v=rGQneD68f1w)

Links: [Chrome Web Store](https://chrome.google.com/webstore/detail/linkoff-clean-your-feed/maanaljajdhhnllllmhmiiboodmoffon) | [Firefox Add-Ons](https://addons.mozilla.org/en-US/firefox/addon/linkoff-clean-your-feed/) | [Edge Extensions (Guide)](https://www.howtogeek.com/411830/how-to-install-google-chrome-extensions-in-microsoft-edge/) | [Brave, Vivaldi (click the Add button)](https://chrome.google.com/webstore/detail/linkoff-clean-your-feed/maanaljajdhhnllllmhmiiboodmoffon) | [Opera Add-Ons (guide)](https://addons.opera.com/en/extensions/details/install-chrome-extensions/) | [LinkedIn Thread](https://www.linkedin.com/posts/njelich_from-the-idea-to-submission-in-only-12-hours-activity-6785679700992778240-lhRB)

Make your LinkedIn experience better, instantly! With fewer distractions and better filtered content your sales, lead generation and networking will be a smoother and more enjoyable experience.

No more seeing unwanted likes and comments by your connections. Block the feed or filter it using custom keywords and find the connections and posts you want more easily. Job seeking? Advanced job filtering coming soon. While you are waiting, clean up your inbox - it can do it!

Also available on Firefox. Coming soon to Opera and other browsers.

🚀 Features
>⭐️ Option to hide the whole feed
>
>⭐️ Post filtering by content (polls, videos, promoted, shared, etc)
>
>⭐️ Hide posts by companies or specific people
>
>⭐️ Filter by custom keywords (politics, coronavirus, vaccination, Noah Jelich, whatever)
>
>⭐️ Hide posts shown due to interactions (comments, reactions, followed by connections)
>
>⭐️ Hide irrelevant old posts (older than an hour, day, week, month)
>⭐️ Select messages for mass deletion (clean your inbox)
>
>⭐️ MESSAGE FILTERS COMING SOON
>⭐️ JOB FILTERING COMING SOON
>⭐️ Block ads on LinkedIn (banners, and sidebar)
>
>⭐️ Hide LinkedIn learning and course recommendations
>
>⭐️ Hide community panel and follow recommendations
>
>⭐️ Stop LinkedIn premium upsell pestering
>
>⭐️ Toggle-able dark mode
>
>⭐️ Account switching (WIP)
>⭐️ Fully configurable to suit your need!
>
>⭐️ Completely FREE and with NO ADS
>⭐️ Made with ❤️ by Noah Jelich
🚀 Frequently Asked Questions

>⭐️ Are you going to make a Tampermonkey/Greasemonkey script?
>
Unfortunately, no. I do not have time to maintain any more code
>⭐️ What about Vivaldi/Brave/Edge/Opera and other browsers?
>
The extension can be natively installed on all chromium browsers
>⭐️ What about Safari and MacOs?
>
The store charges 100$ per year to post apps, which I cannot afford
>⭐️ How can I use this on mobile?
>
Since neither Chrome or Firefox allow for extensions in mobile browsers, you need to install a chromium distribution that does. I recommend Kiwi Browser (if you have any issues, please report them, still testing mobile support)

### Contributing

Please create an issue before submitting a pull request.

Use npm to install dependencies, simply run `npm i`. To rebuild the CSS from SCSS run `npm run css-build`.

To install the extension locally follow the instructions below for your browser.

**Firefox**

* Type about:debugging in the Firefox URL bar and press enter.
* Click This Firefox on the left, and then Load Temporary Add-on... in the middle
* Navigate to the location of the folder you unzipped, select the manifest.json file inside.

**Chromium**

* Type chrome://extensions in the Chrome URL bar and press enter.
* Enable developer mode using the toggle on the right
* Click Load Unpacked on the left side of the screen.
* Navigate to the location of the folder you unzipped, and select it.

#### Commit message format

Each commit message consists of a **header**, a **body**, and a **footer**.

```
<header>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
The `<header>` format should be as follows:

```
<type>(<scope>): <short summary>
│ │ │
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│ │
│ └─⫸ Commit Scope: common|home|feed|messages|jobs|misc... or empty
└─⫸ Commit Type: feat|fix|perf
```


##### Revert

If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.

##### Type

If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.

##### Subject

The subject contains succinct description of the change:

* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize first letter
* no dot (.) at the end

##### Body

Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.

##### Footer

The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
Binary file added assets/promo-video.mov
Binary file not shown.
Binary file added assets/screenshot-off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot-on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Set defaults on install.

chrome.storage.local.get(null, function (res) {
if (res.initialized !== "v0.5")
chrome.storage.local.set({
"initialized": "v0.5",
"feed-keywords": "",
"gentle-mode": false,
"dark-mode": true,
"hide-account-building": false,
"hide-advertisements": true,
"hide-by-age": "week",
"hide-by-companies": true,
"hide-by-people": false,
"hide-commented-on": false,
"hide-follow-recommendations": true,
"hide-followed": true,
"hide-community-panel": true,
"hide-images": false,
"hide-linkedin-learning": true,
"hide-links": false,
"hide-polls": true,
"hide-premium": true,
"hide-promoted": true,
"hide-shared": false,
"hide-videos": false,
"hide-whole-feed": false,
"hide-liked": true,
"hide-other-reactions": false,
"main-toggle": true,
"sort-by-recent": true,
});
});

// Fetch login cookie

chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
console.log(request);
if(request.name=="fetchLiAt") {
fetchLiAtCookie(request.data.accountList, request.data.name)
}
sendResponse("Got login cookie");
});

async function fetchLiAtCookie(accountList, name) {
chrome.cookies.getAll({ domain: "linkedin.com", name: "li_at" },cookie => {
console.log(name)
if (accountList && accountList[name] != cookie[0].value && name) {
const accounts = accountList ? accountList : {};
accounts[name] = cookie[0].value
console.log(accounts)
chrome.storage.local.set({
"account-list": accounts,
});
}
})
}
Loading

0 comments on commit c832a3c

Please sign in to comment.