更新支持twitter

This commit is contained in:
Tw93
2022-11-03 01:18:52 +08:00
parent 9a94ce40ca
commit d66bd75334
3 changed files with 174 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
<p align="center">
<img src=https://gw.alipayobjects.com/zos/k/fa/logo-modified.png width=138/>
<h1 align="center">Pake</h1>
<div align="left">很简单的用 Rust 打包网页生成很小的 Mac App底层使用 Tauri支持微信读书、Flomo、RunCode、Witeboard、ToolsFun、Vercel 等,详细小白开发教程可见底部。</div>
<div align="left">很简单的用 Rust 打包网页生成很小的 Mac App底层使用 Tauri支持微信读书、Twitter、RunCode、Witeboard、Flomo、Vercel 等,详细小白开发教程可见底部。</div>
</p>
## 特征
@@ -31,11 +31,11 @@
<table>
<tr>
<td>WeRead <a href="https://github.com/tw93/Pake/releases/latest/download/WeRead.dmg">Download</a></td>
<td>Flomo <a href="https://github.com/tw93/Pake/releases/latest/download/Flomo.dmg">Download</a></td>
<td>Twitter <a href="https://github.com/tw93/Pake/releases/latest/download/Twitter.dmg">Download</a></td>
</tr>
<tr>
<td><img src=https://cdn.fliggy.com/upic/ffUmdj.png width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/B49SAc.png width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/L4HNQ6.png width=600/></td>
</tr>
<tr>
<td>RunCode <a href="https://github.com/tw93/Pake/releases/latest/download/RunCode.dmg">Download</a></td>
@@ -46,11 +46,11 @@
<td><img src=https://cdn.fliggy.com/upic/o5QY4c.png width=600/></td>
</tr>
<tr>
<td>ToolsFun <a href="https://github.com/tw93/Pake/releases/latest/download/Tools.dmg">Download</a></td>
<td>Flomo <a href="https://github.com/tw93/Pake/releases/latest/download/Flomo.dmg">Download</a></td>
<td>Vercel <a href="https://github.com/tw93/Pake/releases/latest/download/Vercel.dmg">Download</a></td>
</tr>
<tr>
<td><img src=https://cdn.fliggy.com/upic/jVCiL0.png width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/B49SAc.png width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/CPVRnY.png width=600/></td>
</tr>
</table>

View File

@@ -31,11 +31,11 @@ In addition, it supports double clicking the head to switch to full screen, and
<table>
<tr>
<td>WeRead <a href="https://github.com/tw93/Pake/releases/latest/download/WeRead.dmg">Download</a></td>
<td>Flomo <a href="https://github.com/tw93/Pake/releases/latest/download/Flomo.dmg">Download</a></td>
<td>Twitter <a href="https://github.com/tw93/Pake/releases/latest/download/Twitter.dmg">Download</a></td>
</tr>
<tr>
<td><img src=https://cdn.fliggy.com/upic/ffUmdj.png width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/B49SAc.png width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/L4HNQ6.png width=600/></td>
</tr>
<tr>
<td>RunCode <a href="https://github.com/tw93/Pake/releases/latest/download/RunCode.dmg">Download</a></td>
@@ -46,11 +46,11 @@ In addition, it supports double clicking the head to switch to full screen, and
<td><img src=https://cdn.fliggy.com/upic/o5QY4c.png width=600/></td>
</tr>
<tr>
<td>ToolsFun <a href="https://github.com/tw93/Pake/releases/latest/download/Tools.dmg">Download</a></td>
<td>Flomo <a href="https://github.com/tw93/Pake/releases/latest/download/Flomo.dmg">Download</a></td>
<td>Vercel <a href="https://github.com/tw93/Pake/releases/latest/download/Vercel.dmg">Download</a></td>
</tr>
<tr>
<td><img src=https://cdn.fliggy.com/upic/jVCiL0.png width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/B49SAc.png width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/CPVRnY.png width=600/></td>
</tr>
</table>

165
dist/twitter.css vendored Normal file
View File

@@ -0,0 +1,165 @@
[data-testid='placementTracking'] article,
a[href*='quick_promote_web'],
[data-testid='AppTabBar_Explore_Link'],
a[href*='/lists'][role='link'][aria-label],
a[href='/i/bookmarks'] {
display: none !important;
}
/* Hide Messages Drawer */
[data-testid='DMDrawer'] {
visibility: hidden !important;
}
[data-testid='primaryColumn'] > div > div {
position: relative !important;
}
/* Hide sidebar */
[data-testid='sidebarColumn'] {
visibility: hidden !important;
width: 0 !important;
margin: 0 !important;
padding: 0 !important;
z-index: 1 !important;
}
/* Twitter has a large screen breakpoint at 1000px */
/* Twitter web's small screen styles (< 988px) are minimal */
@media only screen and (min-width: 1000px) {
/* Center the Timeline */
/* Prevent horizontal scroll */
main[role='main'] {
align-items: center !important;
overflow-x: clip !important;
}
/* Match widths for feed */
[data-testid='primaryColumn'] {
width: 700px !important;
max-width: 700px !important;
margin: 0 auto !important;
}
[data-testid='primaryColumn'] > div > div:last-child,
[data-testid='primaryColumn'] > div > div:last-child div {
max-width: unset !important;
}
/* Nudge engagement row 81px right */
/* In default feed: 506px - 425px */
div[aria-label][role='group'][id^='id__'] {
margin-right: 81px !important;
}
/* Fix navigation to left */
header[role='banner'] {
position: fixed !important;
left: 0 !important;
}
header[role='banner'] > div > div > div {
justify-content: center !important;
padding-top: 0;
}
form[role='search'] > div:nth-child(1) > div {
background-color: transparent !important;
}
/* Align Twitter navigation icon with search */
h1[role='heading'] {
padding-top: 4px !important;
}
/* Navigation buttons labels and Account button label on hover */
header[role='banner']
nav[role='navigation']
*
div[dir='auto']:not([aria-label])
> span,
[data-testid='SideNav_AccountSwitcher_Button'] > div:not(:first-child) {
display: inline-block !important;
opacity: 0 !important;
transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
header[role='banner']
nav[role='navigation']:hover
*
div[dir='auto']:not([aria-label])
> span,
[data-testid='SideNav_AccountSwitcher_Button']:hover > div:not(:first-child) {
opacity: 1 !important;
}
header[role='banner'] nav[role='navigation']:hover > * > div {
backdrop-filter: blur(12px) !important;
}
/* Align account button with floating tweet button */
[data-testid='SideNav_AccountSwitcher_Button'] {
bottom: 18px !important;
left: 1px !important;
}
/* Floating Tweet Button */
[data-testid='SideNav_NewTweet_Button'] {
position: fixed !important;
right: 16px !important;
bottom: 24px !important;
}
}
/* Add padding equal to navigation size when between 1000px-1265px */
@media only screen and (min-width: 1000px) and (max-width: 1265px) {
body {
padding-left: 88px;
}
}
/* Reveal searchbar and search filters at desktop breakpoint */
@media only screen and (min-width: 1265px) {
/* Reveal searchbar */
[data-testid='sidebarColumn'] form[role='search'] {
visibility: visible !important;
position: fixed !important;
top: 12px !important;
right: 16px !important;
}
/* Match size of input the placeholder content */
[data-testid='sidebarColumn'] input[placeholder='Search Twitter'] {
width: 150px;
}
/* Match size of focused search container to its dropdown */
/* Add blur filter to search container for overlap */
[data-testid='sidebarColumn'] form[role='search']:focus-within {
width: 374px !important;
backdrop-filter: blur(12px) !important;
}
/* Match size of focused search input to its dropdown */
[data-testid='sidebarColumn'] input[placeholder='Search Twitter']:focus {
width: 328px !important;
}
/* Reset width and left positioning to align search dropdown */
div[style*='left: -12px'] {
left: unset !important;
}
div[style='left: -8px; width: 306px;'] {
left: unset !important;
width: 374px !important;
}
/* Search Filters Custom Class */
.searchFilters {
visibility: visible !important;
position: fixed;
top: 12px;
right: 16px;
width: 240px;
}
.searchFilters > div > div:first-child {
display: none;
}
}