Skip to content

Commit

Permalink
Merge pull request #111 from Cqoicebordel/patch-1
Browse files Browse the repository at this point in the history
Detect protected account, and avoid marking them as verified
  • Loading branch information
waltzaround authored May 25, 2024
2 parents c5d120b + 8a64eb2 commit 06f75fe
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,9 @@ function handleProfileModification(containerElement, isBig) {
const checkmarkContainer = ltr[0];
const spans = checkmarkContainer.querySelectorAll("span");
const checkmarkSpan = spans[spans.length - 1];
const protectd = checkmarkSpan.querySelectorAll('[aria-label="Protected account"]')[0]

if (!checkmarkSpan) {
if (!checkmarkSpan || protectd) {
console.error("no checkmark span found");
return;
}
Expand Down Expand Up @@ -410,8 +411,9 @@ async function handleHeadingModification(containerElement, isBig) {

const spans = containerElement.querySelectorAll("span");
const checkmarkSpan = spans[spans.length - 1];
const protectd = checkmarkSpan.querySelectorAll('[aria-label="Protected account"]')[0]

if (!checkmarkSpan) {
if (!checkmarkSpan || protectd) {
console.error("no checkmark span found");
return;
}
Expand Down Expand Up @@ -449,8 +451,9 @@ function handleModification(
const ltr = containerElement.querySelectorAll('[dir="ltr"]');
const checkmarkContainer = ltr[checkmarkIndex];
const checkmarkSpan = checkmarkContainer.children?.[0];
const protectd = checkmarkSpan.querySelectorAll('[aria-label="Protected account"]')[0]

if (!checkmarkSpan) {
if (!checkmarkSpan || protectd) {
return;
}

Expand Down

0 comments on commit 06f75fe

Please sign in to comment.