Skip to content

Commit

Permalink
v1.2.2 (#12)
Browse files Browse the repository at this point in the history
* Fix dropdown account picker styling
  • Loading branch information
69 authored Apr 24, 2020
1 parent 4c25183 commit e8e5721
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scam",
"version": "1.2.1",
"version": "1.2.2",
"description": "SoundCloud Account Manager Extension",
"author": "reid",
"license": "MIT",
Expand Down
12 changes: 6 additions & 6 deletions src/switcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '#';
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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')) {
Expand Down

0 comments on commit e8e5721

Please sign in to comment.