Skip to content

Commit 9821fd4

Browse files
committed
check username
1 parent e82ba35 commit 9821fd4

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

app.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ function runMedium(url) {
9797
if (
9898
ignoreURLs.indexOf(u.pathname) == -1 &&
9999
checkWildCardPaths(u.pathname) == false &&
100+
checkUserProfile(u.pathname) == false &&
100101
u.pathname.split("/").filter((e) => e).length >= 1
101102
) {
102103
var leftDiv = document.createElement("div");
@@ -223,3 +224,14 @@ function checkWildCardPaths(currentPath) {
223224
};
224225
return ignoreURLs.some(match);
225226
}
227+
228+
function checkUserProfile(currentPath) {
229+
let splittedCurrentPath = currentPath.split("/").filter((e) => e);
230+
if (
231+
splittedCurrentPath[0].startsWith("@") &&
232+
splittedCurrentPath.length == 1
233+
) {
234+
return true;
235+
}
236+
return false;
237+
}

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "Medium parser",
4-
"version": "1.5.2",
4+
"version": "1.5.3",
55
"description": "Read Medium.com and medium.com based articles for free.",
66
"icons": {
77
"16": "img/icon16.jpg",

0 commit comments

Comments
 (0)