Skip to content

Commit

Permalink
Merge pull request #139 from NIAEFEUP/fix/getUp
Browse files Browse the repository at this point in the history
Fix getUP on new layout
  • Loading branch information
ttoino authored Sep 20, 2023
2 parents 26f012a + ad01c22 commit 9ac2e31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions content-scripts/src/modules/utilities/sigarra.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* @returns true if user is authenticated, false otherwise
*/
export const isAuth = () => {
const authDiv = document.getElementsByClassName("autenticado");
return authDiv.length > 0;
return document.querySelector('#se-auth-form') == null;
};

/**
Expand All @@ -15,7 +14,7 @@ export const isAuth = () => {
*/
export const getUP = () => {
if (isAuth()) {
const pfp = document.querySelector(".autenticado > .fotografia > img");
const pfp = document.querySelector("#se-auth-profile-button > img");

return pfp.src.substr(-9, pfp.src.length);
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ let manifest = {
name: "NitSig: Sigarra, but Neater",
short_name: "NitSig",
description: "A Neater Sigarra by improving its UI/UX experience and adding new features",
version: "1.0.1",
version: "1.0.2",
manifest_version: 3,
icons: {
16: "images/logo/logo-16.png",
Expand Down

0 comments on commit 9ac2e31

Please sign in to comment.