Add up to 3 blanks

This commit is contained in:
the1812 2019-05-08 21:05:37 +08:00
parent 1e3c0de898
commit b6fea71931
10 changed files with 132 additions and 105 deletions

View File

@ -57,6 +57,7 @@ declare global
}
interface CustomNavbarComponents
{
blank1: number;
logo: number;
category: number;
rankingLink: number;
@ -66,7 +67,7 @@ declare global
livesIframe: number;
shopLink: number;
mangaLink: number;
blank: number;
blank2: number;
search: number;
userInfo: number;
messages: number;
@ -75,6 +76,7 @@ declare global
favoritesList: number;
historyList: number;
upload: number;
blank3: number;
}
const GM_info: MonkeyInfo;
const unsafeWindow: Window;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -105,24 +105,26 @@ const settings = {
customNavbarCompact: false,
customNavbarBlur: false,
customNavbarOrder: {
logo: 0,
category: 1,
rankingLink: 2,
drawingLink: 3,
musicLink: 4,
gamesIframe: 5,
livesIframe: 6,
shopLink: 7,
mangaLink: 8,
blank: 9,
search: 10,
userInfo: 11,
messages: 12,
activities: 13,
watchlaterList: 14,
favoritesList: 15,
historyList: 16,
upload: 17,
blank1: 0,
logo: 1,
category: 2,
rankingLink: 3,
drawingLink: 4,
musicLink: 5,
gamesIframe: 6,
livesIframe: 7,
shopLink: 8,
mangaLink: 9,
blank2: 10,
search: 11,
userInfo: 12,
messages: 13,
activities: 14,
watchlaterList: 15,
favoritesList: 16,
historyList: 17,
upload: 18,
blank3: 19
},
customNavbarHidden: [],
playerShadow: false,

View File

@ -105,24 +105,26 @@ const settings = {
customNavbarCompact: false,
customNavbarBlur: false,
customNavbarOrder: {
logo: 0,
category: 1,
rankingLink: 2,
drawingLink: 3,
musicLink: 4,
gamesIframe: 5,
livesIframe: 6,
shopLink: 7,
mangaLink: 8,
blank: 9,
search: 10,
userInfo: 11,
messages: 12,
activities: 13,
watchlaterList: 14,
favoritesList: 15,
historyList: 16,
upload: 17,
blank1: 0,
logo: 1,
category: 2,
rankingLink: 3,
drawingLink: 4,
musicLink: 5,
gamesIframe: 6,
livesIframe: 7,
shopLink: 8,
mangaLink: 9,
blank2: 10,
search: 11,
userInfo: 12,
messages: 13,
activities: 14,
watchlaterList: 15,
favoritesList: 16,
historyList: 17,
upload: 18,
blank3: 19
},
customNavbarHidden: [],
playerShadow: false,

View File

@ -80,24 +80,26 @@ export const settings = {
customNavbarCompact: false,
customNavbarBlur: false,
customNavbarOrder: {
logo: 0,
category: 1,
rankingLink: 2,
drawingLink: 3,
musicLink: 4,
gamesIframe: 5,
livesIframe: 6,
shopLink: 7,
mangaLink: 8,
blank: 9,
search: 10,
userInfo: 11,
messages: 12,
activities: 13,
watchlaterList: 14,
favoritesList: 15,
historyList: 16,
upload: 17,
blank1: 0,
logo: 1,
category: 2,
rankingLink: 3,
drawingLink: 4,
musicLink: 5,
gamesIframe: 6,
livesIframe: 7,
shopLink: 8,
mangaLink: 9,
blank2: 10,
search: 11,
userInfo: 12,
messages: 13,
activities: 14,
watchlaterList: 15,
favoritesList: 16,
historyList: 17,
upload: 18,
blank3: 19
},
customNavbarHidden: [],
playerShadow: false,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -113,7 +113,7 @@ li.nav-item[report-id='playpage_dynamic'] .i-frame,
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 5%;
margin: 0;
height: 100%;
flex-grow: 1;
}
@ -135,6 +135,17 @@ li.nav-item[report-id='playpage_dynamic'] .i-frame,
align-items: center;
color: inherit;
}
.custom-navbar>ul>li.view-border::before
{
content: "";
width: 100%;
height: 100%;
border: 2px dashed #888a;
position: absolute;
top: 0;
left: 0;
box-sizing: border-box;
}
.custom-navbar>ul>li:not(.disabled)
{
cursor: pointer;

View File

@ -20,6 +20,7 @@ const attributes = {
document.querySelector(".gui-settings-mask").click();
});
const displayNames = {
blank1: "弹性空白1",
logo: "Logo",
category: "主站及分区",
rankingLink: "排行",
@ -29,7 +30,7 @@ const attributes = {
livesIframe: "直播",
shopLink: "会员购",
mangaLink: "漫画",
blank: "弹性空白",
blank2: "弹性空白2",
search: "搜索框",
userInfo: "用户信息",
messages: "消息",
@ -38,6 +39,7 @@ const attributes = {
favoritesList: "收藏",
historyList: "历史",
upload: "投稿入口",
blank3: "弹性空白3",
};
Vue.component("order-item", {
props: ["item"],
@ -194,15 +196,16 @@ class NavbarComponent
}
class Blank extends NavbarComponent
{
constructor()
constructor(number)
{
super();
this.number = number;
this.flex = "1 0 auto";
this.disabled = true;
}
get name()
{
return "blank";
return "blank" + this.number;
}
}
class Logo extends NavbarComponent
@ -940,6 +943,7 @@ class HistoryList extends VideoList
});
const components = [
new Blank(1),
new Logo,
new Category,
new SimpleLink("排行", "https://www.bilibili.com/ranking", "ranking"),
@ -961,7 +965,7 @@ class HistoryList extends VideoList
}),
new SimpleLink("会员购", "https://show.bilibili.com/platform/home.html?msource=pc_web", "shop"),
new SimpleLink("漫画", "https://manga.bilibili.com", "manga"),
new Blank,
new Blank(2),
new SearchBox,
new UserInfo,
];
@ -975,7 +979,7 @@ class HistoryList extends VideoList
new HistoryList,
);
}
components.push(new Upload);
components.push(new Upload, new Blank(3));
new Vue({
el: ".custom-navbar",
data: {