Skip to content

Commit

Permalink
check username
Browse files Browse the repository at this point in the history
  • Loading branch information
Xatta-Trone committed Jan 8, 2024
1 parent e82ba35 commit 9821fd4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function runMedium(url) {
if (
ignoreURLs.indexOf(u.pathname) == -1 &&
checkWildCardPaths(u.pathname) == false &&
checkUserProfile(u.pathname) == false &&
u.pathname.split("/").filter((e) => e).length >= 1
) {
var leftDiv = document.createElement("div");
Expand Down Expand Up @@ -223,3 +224,14 @@ function checkWildCardPaths(currentPath) {
};
return ignoreURLs.some(match);
}

function checkUserProfile(currentPath) {
let splittedCurrentPath = currentPath.split("/").filter((e) => e);
if (
splittedCurrentPath[0].startsWith("@") &&
splittedCurrentPath.length == 1
) {
return true;
}
return false;
}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Medium parser",
"version": "1.5.2",
"version": "1.5.3",
"description": "Read Medium.com and medium.com based articles for free.",
"icons": {
"16": "img/icon16.jpg",
Expand Down

0 comments on commit 9821fd4

Please sign in to comment.