🐛 更新最新的版本
This commit is contained in:
@@ -159,12 +159,12 @@ fn main() -> wry::Result<()> {
|
|||||||
// 用于欺骗部分页面对于浏览器的强检测
|
// 用于欺骗部分页面对于浏览器的强检测
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
let user_agent_string = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15";
|
// let user_agent_string = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15";
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
let webview = WebViewBuilder::new(window)?
|
let webview = WebViewBuilder::new(window)?
|
||||||
.with_user_agent(user_agent_string)
|
// .with_user_agent(user_agent_string)
|
||||||
.with_accept_first_mouse(true)
|
// .with_accept_first_mouse(true)
|
||||||
.with_url(&url.to_string())?
|
.with_url(&url.to_string())?
|
||||||
.with_devtools(cfg!(feature = "devtools"))
|
.with_devtools(cfg!(feature = "devtools"))
|
||||||
.with_initialization_script(include_str!("pake.js"))
|
.with_initialization_script(include_str!("pake.js"))
|
||||||
|
|||||||
77
src-tauri/src/pake.js
vendored
77
src-tauri/src/pake.js
vendored
@@ -55,6 +55,14 @@ window.addEventListener("DOMContentLoaded", (_event) => {
|
|||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lark > .dashboard-sidebar, .lark > .dashboard-sidebar > .sidebar-user-info , .lark > .dashboard-sidebar .index-module_wrapper_F-Wbq{
|
||||||
|
padding-top:15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lark > .main-wrapper [data-testid="aside"] {
|
||||||
|
top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.panel.give_me .nav_view {
|
.panel.give_me .nav_view {
|
||||||
top: 154px !important;
|
top: 154px !important;
|
||||||
}
|
}
|
||||||
@@ -92,23 +100,23 @@ window.addEventListener("DOMContentLoaded", (_event) => {
|
|||||||
margin-top:24px;
|
margin-top:24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-testid="placementTracking"] article,
|
#react-root [data-testid="placementTracking"] article,
|
||||||
a[href*="quick_promote_web"],
|
#react-root a[href*="quick_promote_web"],
|
||||||
[data-testid="AppTabBar_Explore_Link"],
|
#react-root [data-testid="AppTabBar_Explore_Link"],
|
||||||
a[href*="/lists"][role="link"][aria-label],
|
#react-root a[href*="/lists"][role="link"][aria-label],
|
||||||
a[href="/i/bookmarks"] {
|
#react-root a[href="/i/bookmarks"] {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-testid="DMDrawer"] {
|
#react-root [data-testid="DMDrawer"] {
|
||||||
visibility: hidden !important;
|
visibility: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-testid="primaryColumn"] > div > div {
|
#react-root [data-testid="primaryColumn"] > div > div {
|
||||||
position: relative !important;
|
position: relative !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-testid="sidebarColumn"] {
|
#react-root [data-testid="sidebarColumn"] {
|
||||||
visibility: hidden !important;
|
visibility: hidden !important;
|
||||||
width: 0 !important;
|
width: 0 !important;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
@@ -117,69 +125,69 @@ window.addEventListener("DOMContentLoaded", (_event) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 1000px) {
|
@media only screen and (min-width: 1000px) {
|
||||||
main[role="main"] {
|
#react-root main[role="main"] {
|
||||||
align-items: center !important;
|
align-items: center !important;
|
||||||
overflow-x: clip !important;
|
overflow-x: clip !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-testid="primaryColumn"] {
|
#react-root [data-testid="primaryColumn"] {
|
||||||
width: 700px !important;
|
width: 700px !important;
|
||||||
max-width: 700px !important;
|
max-width: 700px !important;
|
||||||
margin: 0 auto !important;
|
margin: 0 auto !important;
|
||||||
}
|
}
|
||||||
[data-testid="primaryColumn"] > div > div:last-child,
|
#react-root [data-testid="primaryColumn"] > div > div:last-child,
|
||||||
[data-testid="primaryColumn"] > div > div:last-child div {
|
#react-root [data-testid="primaryColumn"] > div > div:last-child div {
|
||||||
max-width: unset !important;
|
max-width: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
div[aria-label][role="group"][id^="id__"] {
|
#react-root div[aria-label][role="group"][id^="id__"] {
|
||||||
margin-right: 81px !important;
|
margin-right: 81px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
header[role="banner"] {
|
#react-root header[role="banner"] {
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
header[role="banner"] > div > div > div {
|
#react-root header[role="banner"] > div > div > div {
|
||||||
justify-content: center !important;
|
justify-content: center !important;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
form[role="search"] > div:nth-child(1) > div {
|
#react-root form[role="search"] > div:nth-child(1) > div {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1[role="heading"] {
|
#react-root h1[role="heading"] {
|
||||||
padding-top: 4px !important;
|
padding-top: 4px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
header[role="banner"]
|
#react-root header[role="banner"]
|
||||||
nav[role="navigation"]
|
nav[role="navigation"]
|
||||||
*
|
*
|
||||||
div[dir="auto"]:not([aria-label])
|
div[dir="auto"]:not([aria-label])
|
||||||
> span,
|
> span,
|
||||||
[data-testid="SideNav_AccountSwitcher_Button"] > div:not(:first-child) {
|
#react-root [data-testid="SideNav_AccountSwitcher_Button"] > div:not(:first-child) {
|
||||||
display: inline-block !important;
|
display: inline-block !important;
|
||||||
opacity: 0 !important;
|
opacity: 0 !important;
|
||||||
transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
|
transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||||
}
|
}
|
||||||
header[role="banner"]
|
#react-root header[role="banner"]
|
||||||
nav[role="navigation"]:hover
|
nav[role="navigation"]:hover
|
||||||
*
|
*
|
||||||
div[dir="auto"]:not([aria-label])
|
div[dir="auto"]:not([aria-label])
|
||||||
> span,
|
> span,
|
||||||
[data-testid="SideNav_AccountSwitcher_Button"]:hover > div:not(:first-child) {
|
#react-root [data-testid="SideNav_AccountSwitcher_Button"]:hover > div:not(:first-child) {
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
}
|
}
|
||||||
header[role="banner"] nav[role="navigation"]:hover > * > div {
|
#react-root header[role="banner"] nav[role="navigation"]:hover > * > div {
|
||||||
backdrop-filter: blur(12px) !important;
|
backdrop-filter: blur(12px) !important;
|
||||||
}
|
}
|
||||||
header[role="banner"] nav[role="navigation"] > a {
|
#react-root header[role="banner"] nav[role="navigation"] > a {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
header[role="banner"] nav[role="navigation"] > a::before {
|
#react-root header[role="banner"] nav[role="navigation"] > a::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
@@ -187,12 +195,12 @@ window.addEventListener("DOMContentLoaded", (_event) => {
|
|||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
}
|
}
|
||||||
[data-testid="SideNav_AccountSwitcher_Button"] {
|
#react-root [data-testid="SideNav_AccountSwitcher_Button"] {
|
||||||
bottom: 18px !important;
|
bottom: 18px !important;
|
||||||
left: 1px !important;
|
left: 1px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-testid="SideNav_NewTweet_Button"] {
|
#react-root [data-testid="SideNav_NewTweet_Button"] {
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
right: 16px !important;
|
right: 16px !important;
|
||||||
bottom: 24px !important;
|
bottom: 24px !important;
|
||||||
@@ -200,42 +208,43 @@ window.addEventListener("DOMContentLoaded", (_event) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 1265px) {
|
@media only screen and (min-width: 1265px) {
|
||||||
[data-testid="sidebarColumn"] form[role="search"] {
|
#react-root [data-testid="sidebarColumn"] form[role="search"] {
|
||||||
visibility: visible !important;
|
visibility: visible !important;
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
top: 12px !important;
|
top: 12px !important;
|
||||||
right: 16px !important;
|
right: 16px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-testid="sidebarColumn"] input[placeholder="Search Twitter"] {
|
#react-root [data-testid="sidebarColumn"] input[placeholder="Search Twitter"] {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-testid="sidebarColumn"] form[role="search"]:focus-within {
|
#react-root [data-testid="sidebarColumn"] form[role="search"]:focus-within {
|
||||||
width: 374px !important;
|
width: 374px !important;
|
||||||
backdrop-filter: blur(12px) !important;
|
backdrop-filter: blur(12px) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-testid="sidebarColumn"] input[placeholder="Search Twitter"]:focus {
|
#react-root [data-testid="sidebarColumn"] input[placeholder="Search Twitter"]:focus {
|
||||||
width: 328px !important;
|
width: 328px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
div[style*="left: -12px"] {
|
#react-root div[style*="left: -12px"] {
|
||||||
left: unset !important;
|
left: unset !important;
|
||||||
}
|
}
|
||||||
div[style="left: -8px; width: 306px;"] {
|
|
||||||
|
#react-root div[style="left: -8px; width: 306px;"] {
|
||||||
left: unset !important;
|
left: unset !important;
|
||||||
width: 374px !important;
|
width: 374px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchFilters {
|
#react-root .searchFilters {
|
||||||
visibility: visible !important;
|
visibility: visible !important;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 12px;
|
top: 12px;
|
||||||
right: 16px;
|
right: 16px;
|
||||||
width: 240px;
|
width: 240px;
|
||||||
}
|
}
|
||||||
.searchFilters > div > div:first-child {
|
#react-root .searchFilters > div > div:first-child {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user