This commit is contained in:
Mirco Wittrien 2019-04-29 10:23:27 +02:00
parent 317d5bac79
commit 8fbb65e404
2 changed files with 70 additions and 45 deletions

View File

@ -3,7 +3,7 @@
class PinDMs {
getName () {return "PinDMs";}
getVersion () {return "1.4.1";}
getVersion () {return "1.4.2";}
getAuthor () {return "DevilBro";}
@ -11,7 +11,7 @@ class PinDMs {
initConstructor () {
this.changelog = {
"fixed":[["Unread Pill","Fixed the issue where the unread indicator would get stuck if you quickly hover between folders/servers"]]
"fixed":[["Unread Pill","Fuck those new hover animations REEEEEE"]]
};
this.patchModules = {
@ -250,10 +250,7 @@ class PinDMs {
}
onSwitch () {
let oldselectedpin = BDFDB.getParentEle(".pinned-dm", document.querySelector(`.pinned-dm ${BDFDB.dotCN.guildpillitem}[style*="height: 40px"]`));
let newselectedpin = document.querySelector(`.pinned-dm[channelid="${this.CurrentChannelStore.getChannelId()}"]`);
if (oldselectedpin) this.updatePinnedRecent(oldselectedpin.getAttribute("channelid"));
if (newselectedpin) this.updatePinnedRecent(newselectedpin.getAttribute("channelid"));
for (let pin of document.querySelectorAll(".pinned-dm")) this.updatePinnedRecent(pin.getAttribute("channelid"));
}
@ -730,7 +727,7 @@ class PinDMs {
outputRange: [50, 30]
})
.addListener((value) => {
diviconwrapper.style.setProperty("border-radius", `${value.value}%`);
diviconwrapper.style.setProperty("border-radius", `${this.CurrentChannelStore.getChannelId() == id ? 30 : value.value}%`);
});
let pillHeight = new this.Animations.Value(0);
@ -740,7 +737,7 @@ class PinDMs {
outputRange: [8, 20]
})
.addListener((value) => {
divpillitem.style.setProperty("height", `${value.value}px`);
divpillitem.style.setProperty("height", `${this.CurrentChannelStore.getChannelId() == id ? 40 : value.value}px`);
});
let pillOpacity = new this.Animations.Value(0);
@ -750,7 +747,7 @@ class PinDMs {
outputRange: [0, 0.7]
})
.addListener((value) => {
divpillitem.style.setProperty("opacity", `${value.value}`);
divpillitem.style.setProperty("opacity", `${this.CurrentChannelStore.getChannelId() == id ? 1 : value.value}`);
});
let animate = (v) => {

View File

@ -35,34 +35,32 @@
<div class="flex-1xMQg5 flex-1O1GKY horizontal-1ae9ci horizontal-2EEEnY flex-1O1GKY directionRow-3v3tfG justifyStart-2NDFzi alignStretch-DpGPf3 noWrap-3jynv6 container-2lgZY8 firefoxFixScrollFlex-cnI2ix" style="flex: 1 1 auto;">
<div class="wrapper-1Rf91z">
<div class="unreadMentionsIndicatorTop-gA6RCh">
<div class="bar-30k2ka flexCenter-3_1bcw flex-1O1GKY justifyStart-2NDFzi alignCenter-1dQNNs unreadMentionsBar-1VrBNe unread-1xRYoj active-1SSsBb" style="transform: translateY(-150%);">
<svg name="ArrowUp" class="icon-2aINcz" width="24" height="24" viewBox="0 0 24 24">
<polygon fill="currentColor" fill-rule="nonzero" points="13 20 11 20 11 8 5.5 13.5 4.08 12.08 12 4.16 19.92 12.08 18.5 13.5 13 8"></polygon>
</svg>
<div class="bar-30k2ka unreadMentionsBar-1VrBNe unread-1xRYoj active-1SSsBb" style="transform: translateY(-180%);">
<span class="text-2e2ZyG"></span>
</div>
</div>
<div class="scrollerWrap-2lJEkd firefoxFixScrollFlex-cnI2ix scrollerWrap-1IAIlv scrollerThemed-2oenus themeGhostHairline-DBD-2d">
<div class="scroller-2FKFPG firefoxFixScrollFlex-cnI2ix systemPad-3UxEGl scroller-2TZvBN">
<div class="container-1ETFDs">
<div class="wrapper-2lTRaf homeButton-2Cw51C" style="border-radius: 25px; background-color: rgb(47, 49, 54);">
<a class="homeLink-2NBBKi" draggable="false" href="/activity">
<svg name="Discord" class="homeIcon-tEMBK1" width="16" height="16" viewBox="0 0 24 24">
<defs>
<path id="discord-a" d="M19.3529746,6.6495336 C19.3529746,6.6495336 21.7924662,11.032553 21.7924662,16.4386778 C21.7924662,16.4386778 20.3621857,18.8861333 16.6198358,19 C16.6198358,19 16.0157664,18.2739306 15.5092969,17.6373278 C17.7346108,17.0185167 18.5728524,15.6375445 18.5728524,15.6375445 C17.8725385,16.0926723 17.2128913,16.4095334 16.6186497,16.6343862 C15.7732914,16.9825945 14.9499608,17.2169361 14.1559442,17.3623195 C12.5348692,17.6612195 11.0420637,17.5885278 9.76496094,17.353 C8.80200819,17.1749139 7.96241098,16.90465 7.27836377,16.6304889 C6.88965823,16.4829028 6.47248601,16.2926167 6.03362491,16.0521751 C5.97804714,16.0221834 5.92518047,15.9937167 5.87638047,15.9660973 C5.85079436,15.951864 5.82639436,15.9389862 5.80199436,15.9240751 C5.49970548,15.7519195 5.33466659,15.6375445 5.33466659,15.6375445 C5.33466659,15.6375445 6.14884713,16.9797139 8.30350264,17.6117417 C7.79296654,18.2537667 7.17279989,19 7.17279989,19 C3.43044997,18.8861333 2,16.4386778 2,16.4386778 C2,11.032553 4.43813606,6.6495336 4.43813606,6.6495336 C6.87881378,4.8285142 9.19088318,4.88612531 9.19088318,4.88612531 L9.3655804,5.08386697 C6.30863324,5.95328639 4.91766383,7.29155859 4.91766383,7.29155859 C4.91766383,7.29155859 5.28196937,7.0822947 5.92365547,6.81152249 C7.74298043,6.01903084 9.17597207,5.80570029 9.76902761,5.7489364 C9.8639165,5.73538084 9.95728038,5.72097807 10.0535248,5.70877807 C11.0950998,5.5781364 12.2517276,5.5415364 13.4801998,5.67844751 C15.0892442,5.85856695 16.8231691,6.33656972 18.5850524,7.29155859 C18.5850524,7.29155859 17.2537274,6.02580861 14.3633442,5.15621974 L14.6003969,4.88612531 C14.6003969,4.88612531 16.9136525,4.8285142 19.3529746,6.6495336 Z M14.9835861,14.854549 C15.9424722,14.854549 16.7185277,14.0222379 16.7185277,12.9948963 C16.7185277,11.9684018 15.9424722,11.1359213 14.9835861,11.1359213 C14.0260555,11.1359213 13.25,11.9684018 13.25,12.9948963 C13.25,14.0222379 14.0260555,14.854549 14.9835861,14.854549 Z M8.73511107,14.854549 C9.69264161,14.854549 10.4686971,14.0222379 10.4686971,12.9948963 C10.4686971,11.9684018 9.69264161,11.1359213 8.73511107,11.1359213 C7.77605554,11.1359213 7,11.9684018 7,12.9948963 C7,14.0222379 7.77605554,14.854549 8.73511107,14.854549 Z"></path>
</defs>
<g fill="none" fill-rule="evenodd">
<use fill="currentColor" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#discord-a"></use>
</g>
</svg>
<span></span>
</a>
<div class="listItem-2P_4kh">
<div class="pill-2uzAFe wrapper-sa6paO">
<span class="item-2hkk8m" style="opacity: 0; height: 8px; transform: translate3d(-4px, 0px, 0px);"></span>
</div>
</div>
<div class="container-2td-dC" id="bd-pub-li" style="height: 20px;">
<div class="wrapper-2lTRaf" style="height: 20px; border-radius: 4px;">
<a>
<div id="bd-pub-button" style="line-height: 20px; font-size: 12px;">public</div>
</a>
<div tabindex="0" class="blob-1PX1Gp wrapper-25eVIn" role="button">
<svg width="48" height="48" viewBox="0 0 48 48" class="svg-1X37T1">
<mask id="cb24ac7d-d1fd-4226-a8dd-c542a50280bf" fill="black" x="0" y="0" width="48" height="48">
<path d="M48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0C37.2548 0 48 10.7452 48 24Z" fill="white"></path>
<rect x="28" y="-4" width="24" height="24" rx="12" ry="12" transform="translate(20 -20)" fill="black"></rect>
<rect x="28" y="28" width="24" height="24" rx="12" ry="12" transform="translate(20 20)" fill="black"></rect>
</mask>
<foreignObject mask="url(#cb24ac7d-d1fd-4226-a8dd-c542a50280bf)" x="0" y="0" width="48" height="48">
<a class="button-OhfaWu wrapper-1BJsBx" aria-label="Home" href="">
<svg name="Nova_Discord" class="homeIcon-tEMBK1" width="28" height="20" viewBox="0 0 28 20">
<path fill="currentColor" d="M20.6644 20C20.6644 20 19.8014 18.9762 19.0822 18.0714C22.2226 17.1905 23.4212 15.2381 23.4212 15.2381C22.4384 15.881 21.5034 16.3334 20.6644 16.6429C19.4658 17.1429 18.3151 17.4762 17.1884 17.6667C14.887 18.0953 12.7774 17.9762 10.9795 17.6429C9.61301 17.381 8.43836 17 7.45548 16.6191C6.90411 16.4048 6.30479 16.1429 5.70548 15.8096C5.63356 15.7619 5.56164 15.7381 5.48973 15.6905C5.44178 15.6667 5.41781 15.6429 5.39384 15.6191C4.96233 15.381 4.7226 15.2143 4.7226 15.2143C4.7226 15.2143 5.87329 17.1191 8.91781 18.0238C8.19863 18.9286 7.31164 20 7.31164 20C2.0137 19.8333 0 16.381 0 16.381C0 8.7144 3.45205 2.50017 3.45205 2.50017C6.90411 -0.07123 10.1884 0.000197861 10.1884 0.000197861L10.4281 0.285909C6.11301 1.52399 4.12329 3.40493 4.12329 3.40493C4.12329 3.40493 4.65068 3.11921 5.53767 2.71446C8.10274 1.59542 10.1404 1.2859 10.9795 1.21447C11.1233 1.19066 11.2432 1.16685 11.387 1.16685C12.8493 0.976379 14.5034 0.92876 16.2295 1.11923C18.5068 1.38114 20.9521 2.0478 23.4452 3.40493C23.4452 3.40493 21.5514 1.61923 17.476 0.381146L17.8116 0.000197861C17.8116 0.000197861 21.0959 -0.07123 24.5479 2.50017C24.5479 2.50017 28 8.7144 28 16.381C28 16.381 25.9623 19.8333 20.6644 20ZM9.51712 8.88106C8.15068 8.88106 7.07192 10.0715 7.07192 11.5239C7.07192 12.9763 8.17466 14.1667 9.51712 14.1667C10.8836 14.1667 11.9623 12.9763 11.9623 11.5239C11.9863 10.0715 10.8836 8.88106 9.51712 8.88106ZM18.2671 8.88106C16.9007 8.88106 15.8219 10.0715 15.8219 11.5239C15.8219 12.9763 16.9247 14.1667 18.2671 14.1667C19.6336 14.1667 20.7123 12.9763 20.7123 11.5239C20.7123 10.0715 19.6336 8.88106 18.2671 8.88106Z"></path>
</svg>
</a>
</foreignObject>
</svg>
<div class="badgeWrapper-3e8pMZ"></div>
</div>
</div>
<div class="friendsOnline-2JkivW">10 Online</div>
@ -124,27 +122,57 @@
<div class="guildsErrorContainer-2uWYsE">
<a target="_blank" class="guildsError-b7zR5H">!</a>
</div>
<div class="createJoinContainer-2Av064">
<div tabindex="0" class="circleIconButton-jET_ig" role="button">
<span class="plus-3UqSQu">+</span>
<div class="listItem-2P_4kh">
<div class="pill-3YxEhL wrapper-sa6paO">
<span class="item-2hkk8m" style="opacity: 0; height: 8px; transform: translate3d(-4px, 0px, 0px);"></span>
</div>
<div tabindex="0" class="circleButtonMask-2VNJsN wrapper-25eVIn" role="button">
<svg width="48" height="48" viewBox="0 0 48 48" class="svg-1X37T1">
<mask id="fc8484ec-5608-4acb-a464-162b9718ad08" fill="black" x="0" y="0" width="48" height="48">
<path d="M48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0C37.2548 0 48 10.7452 48 24Z" fill="white"></path>
<rect x="28" y="-4" width="24" height="24" rx="12" ry="12" transform="translate(20 -20)" fill="black"></rect>
<rect x="28" y="28" width="24" height="24" rx="12" ry="12" transform="translate(20 20)" fill="black"></rect>
</mask>
<foreignObject mask="url(#fc8484ec-5608-4acb-a464-162b9718ad08)" x="0" y="0" width="48" height="48">
<div tabindex="0" class="circleIconButton-jET_ig" aria-label="Server hinzufügen" role="button">
<svg name="Nova_Add" class="circleIcon-LvPL6c" width="24" height="24" viewBox="0 0 24 24">
<path fill="currentColor" d="M21 11.001H13V3.00098H11V11.001H3V13.001H11V21.001H13V13.001H21V11.001Z"></path>
</svg>
</div>
</foreignObject>
</svg>
<div class="badgeWrapper-3e8pMZ"></div>
</div>
</div>
<div class="container-11WMXy">
<div tabindex="0" class="circleIconButton-jET_ig" role="button">
<svg name="Search" width="24" height="24" viewBox="0 0 18 18">
<g fill="none" fill-rule="evenodd">
<path fill="currentColor" d="M3.60091481,7.20297313 C3.60091481,5.20983419 5.20983419,3.60091481 7.20297313,3.60091481 C9.19611206,3.60091481 10.8050314,5.20983419 10.8050314,7.20297313 C10.8050314,9.19611206 9.19611206,10.8050314 7.20297313,10.8050314 C5.20983419,10.8050314 3.60091481,9.19611206 3.60091481,7.20297313 Z M12.0057176,10.8050314 L11.3733562,10.8050314 L11.1492281,10.5889079 C11.9336764,9.67638651 12.4059463,8.49170955 12.4059463,7.20297313 C12.4059463,4.32933105 10.0766152,2 7.20297313,2 C4.32933105,2 2,4.32933105 2,7.20297313 C2,10.0766152 4.32933105,12.4059463 7.20297313,12.4059463 C8.49170955,12.4059463 9.67638651,11.9336764 10.5889079,11.1492281 L10.8050314,11.3733562 L10.8050314,12.0057176 L14.8073185,16 L16,14.8073185 L12.2102538,11.0099776 L12.0057176,10.8050314 Z"></path>
</g>
<div class="listItem-2P_4kh">
<div class="pill-3YxEhL wrapper-sa6paO">
<span class="item-2hkk8m" style="opacity: 0; height: 8px; transform: translate3d(-4px, 0px, 0px);"></span>
</div>
<div tabindex="0" class="circleButtonMask-2VNJsN wrapper-25eVIn" role="button">
<svg width="48" height="48" viewBox="0 0 48 48" class="svg-1X37T1">
<mask id="17e1719d-09eb-4909-b5ee-873df96d7afa" fill="black" x="0" y="0" width="48" height="48">
<path d="M48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24C0 10.7452 10.7452 0 24 0C37.2548 0 48 10.7452 48 24Z" fill="white"></path>
<rect x="28" y="-4" width="24" height="24" rx="12" ry="12" transform="translate(20 -20)" fill="black"></rect>
<rect x="28" y="28" width="24" height="24" rx="12" ry="12" transform="translate(20 20)" fill="black"></rect>
</mask>
<foreignObject mask="url(#17e1719d-09eb-4909-b5ee-873df96d7afa)" x="0" y="0" width="48" height="48">
<div tabindex="0" class="circleIconButton-jET_ig" aria-label="Server Discovery" role="button">
<svg name="Search" width="24" height="24" viewBox="0 0 18 18">
<g fill="none" fill-rule="evenodd">
<path fill="currentColor" d="M3.60091481,7.20297313 C3.60091481,5.20983419 5.20983419,3.60091481 7.20297313,3.60091481 C9.19611206,3.60091481 10.8050314,5.20983419 10.8050314,7.20297313 C10.8050314,9.19611206 9.19611206,10.8050314 7.20297313,10.8050314 C5.20983419,10.8050314 3.60091481,9.19611206 3.60091481,7.20297313 Z M12.0057176,10.8050314 L11.3733562,10.8050314 L11.1492281,10.5889079 C11.9336764,9.67638651 12.4059463,8.49170955 12.4059463,7.20297313 C12.4059463,4.32933105 10.0766152,2 7.20297313,2 C4.32933105,2 2,4.32933105 2,7.20297313 C2,10.0766152 4.32933105,12.4059463 7.20297313,12.4059463 C8.49170955,12.4059463 9.67638651,11.9336764 10.5889079,11.1492281 L10.8050314,11.3733562 L10.8050314,12.0057176 L14.8073185,16 L16,14.8073185 L12.2102538,11.0099776 L12.0057176,10.8050314 Z"></path>
</g>
</svg>
</div>
</foreignObject>
</svg>
<div class="badgeWrapper-3e8pMZ"></div>
</div>
</div>
</div>
</div>
<div class="unreadMentionsIndicatorBottom-BXS58x">
<div class="bar-30k2ka flexCenter-3_1bcw flex-1O1GKY justifyStart-2NDFzi alignCenter-1dQNNs unreadMentionsBar-1VrBNe unread-1xRYoj active-1SSsBb" style="transform: translateY(150%);">
<svg name="ArrowDown" class="icon-2aINcz" width="24" height="24" viewBox="0 0 24 24">
<polygon fill="currentColor" fill-rule="nonzero" points="13 4.16 11 4.16 11 16.16 5.5 10.66 4.08 12.08 12 20 19.92 12.08 18.5 10.66 13 16.16"></polygon>
</svg>
<div class="bar-30k2ka unreadMentionsBar-1VrBNe unread-1xRYoj active-1SSsBb" style="transform: translateY(150%);">
<span class="text-2e2ZyG"></span>
</div>
</div>
</div>