✨ 更新逻辑
This commit is contained in:
11
dist/twitter.css
vendored
11
dist/twitter.css
vendored
@@ -93,7 +93,18 @@ a[href='/i/bookmarks'] {
|
||||
header[role='banner'] nav[role='navigation']:hover > * > div {
|
||||
backdrop-filter: blur(12px) !important;
|
||||
}
|
||||
header[role='banner'] nav[role='navigation'] > a {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
header[role='banner'] nav[role='navigation'] > a::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: -40px;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
/* Align account button with floating tweet button */
|
||||
[data-testid='SideNav_AccountSwitcher_Button'] {
|
||||
bottom: 18px !important;
|
||||
|
||||
@@ -128,10 +128,11 @@ window.addEventListener('DOMContentLoaded', (_event) => {
|
||||
|
||||
document.addEventListener('click', (e) => {
|
||||
const origin = e.target.closest('a');
|
||||
const href = origin.href;
|
||||
if (href) {
|
||||
if (origin && origin.href) {
|
||||
origin.target = '_self';
|
||||
|
||||
//额外处理下 twitter 的外跳,对于其他需要外跳的可以改这里成对应域名
|
||||
const href = origin.href;
|
||||
if(location.host === "twitter.com" && href.indexOf("twitter.com")===-1){
|
||||
e.preventDefault();
|
||||
window.ipc.postMessage(`open_browser:${href}`);
|
||||
|
||||
Reference in New Issue
Block a user