From e8e57216bc756dabf5b36998082c5c321eafd0f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AEymmaj?= <69@users.noreply.github.com> Date: Fri, 24 Apr 2020 17:37:35 +0200 Subject: [PATCH] v1.2.2 (#12) * Fix dropdown account picker styling --- manifest.json | 2 +- package.json | 2 +- src/switcher.js | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifest.json b/manifest.json index e894cad..a6d81da 100755 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "scam", - "version": "1.2.1", + "version": "1.2.2", "manifest_version": 2, "description": "SoundCloud Account Manager: Quickly switch between multiple SoundCloud accounts.", "homepage_url": "https://github.com/nihilist/scam", diff --git a/package.json b/package.json index 81ea027..644e4c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scam", - "version": "1.2.1", + "version": "1.2.2", "description": "SoundCloud Account Manager Extension", "author": "reid", "license": "MIT", diff --git a/src/switcher.js b/src/switcher.js index 55914c8..4f6bc21 100644 --- a/src/switcher.js +++ b/src/switcher.js @@ -60,9 +60,9 @@ const injectSwitcher = () => { list.setAttribute('class', 'profileMenu__list sc-list-nostyle'); const addBtn = document.createElement('li'); - addBtn.setAttribute('class', 'profileMenu__item'); + addBtn.setAttribute('class', 'headerMenu__list'); const addLink = document.createElement('a'); - addLink.setAttribute('class', 'profileMenu__link profileMenu__friends'); + addLink.setAttribute('class', 'headerMenu__link profileMenu__profile'); addLink.innerText = 'Add Account'; addLink.id = 'add-account'; addLink.href = '#'; @@ -82,8 +82,8 @@ const injectSwitcher = () => { const li = document.createElement('li'); const link = document.createElement('a'); - li.setAttribute('class', 'profileMenu__item'); - link.setAttribute('class', 'profileMenu__link profileMenu__profile'); + li.setAttribute('class', 'headerMenu__item'); + link.setAttribute('class', 'headerMenu__link profileMenu__profile'); link.innerText = account; link.id = 'switch-account'; link.dataset.user = account; @@ -98,7 +98,7 @@ const injectSwitcher = () => { const delBtn = document.createElement('a'); - delBtn.setAttribute('class', 'profileMenu__profile'); + delBtn.setAttribute('class', 'headerMenu__profile'); delBtn.innerHTML = '×'; delBtn.id = 'delete-account'; delBtn.dataset.user = account; @@ -135,7 +135,7 @@ const passSessions = (element) => { const menuObserver = new MutationObserver((mutations) => { for (const mutation of mutations) { const addedNodes = Array.from(mutation.addedNodes); - if (addedNodes.includes(sel('.dropdownMenu')) || addedNodes.includes(sel('.profileMenu__list'))) { + if (addedNodes.includes(sel('.dropdownMenu')) || addedNodes.includes(sel('.headerMenu__list'))) { injectSwitcher(); } if (mutation.target.classList && [...mutation.target.classList].includes('header__userNavUsernameButton')) {