-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(chrome): add linkd custom blocker
- Loading branch information
Showing
12 changed files
with
76 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,6 +1,6 @@ | ||
[package] | ||
name = "spider" | ||
version = "2.20.2" | ||
version = "2.20.3" | ||
authors = [ | ||
"j-mendez <jeff@spider.cloud>" | ||
] | ||
|
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
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,29 @@ | ||
use crate::handler::blockers::Trie; | ||
|
||
lazy_static::lazy_static! { | ||
/// Ignore list of urls. | ||
static ref URL_IGNORE_TRIE: Trie = { | ||
let mut trie = Trie::new(); | ||
let patterns = [ | ||
"/log", | ||
"https://www.linkedin.com/li/track", | ||
"https://li.protechts.net", | ||
"https://www.linkedin.com/platform-telemetry/li", | ||
"https://www.linkedin.com/organization-guest/api/feedUpdates/", | ||
"https://www.linkedin.com/feedcontent-guest/api/ingraphs/gauge", | ||
"https://www.linkedin.com/voyager/api/", | ||
"https://platform.linkedin.com/litms/allowlist/voyager-web-global" | ||
]; | ||
for pattern in &patterns { | ||
trie.insert(pattern); | ||
} | ||
trie | ||
}; | ||
} | ||
|
||
// Block linkedin events that are not required | ||
pub fn block_linkedin( | ||
event: &chromiumoxide_cdp::cdp::browser_protocol::fetch::EventRequestPaused, | ||
) -> bool { | ||
URL_IGNORE_TRIE.contains_prefix(&event.request.url) | ||
} |
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
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
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
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