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 interface CustomNavbarComponents
{ {
blank1: number;
logo: number; logo: number;
category: number; category: number;
rankingLink: number; rankingLink: number;
@ -66,7 +67,7 @@ declare global
livesIframe: number; livesIframe: number;
shopLink: number; shopLink: number;
mangaLink: number; mangaLink: number;
blank: number; blank2: number;
search: number; search: number;
userInfo: number; userInfo: number;
messages: number; messages: number;
@ -75,6 +76,7 @@ declare global
favoritesList: number; favoritesList: number;
historyList: number; historyList: number;
upload: number; upload: number;
blank3: number;
} }
const GM_info: MonkeyInfo; const GM_info: MonkeyInfo;
const unsafeWindow: Window; 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, customNavbarCompact: false,
customNavbarBlur: false, customNavbarBlur: false,
customNavbarOrder: { customNavbarOrder: {
logo: 0, blank1: 0,
category: 1, logo: 1,
rankingLink: 2, category: 2,
drawingLink: 3, rankingLink: 3,
musicLink: 4, drawingLink: 4,
gamesIframe: 5, musicLink: 5,
livesIframe: 6, gamesIframe: 6,
shopLink: 7, livesIframe: 7,
mangaLink: 8, shopLink: 8,
blank: 9, mangaLink: 9,
search: 10, blank2: 10,
userInfo: 11, search: 11,
messages: 12, userInfo: 12,
activities: 13, messages: 13,
watchlaterList: 14, activities: 14,
favoritesList: 15, watchlaterList: 15,
historyList: 16, favoritesList: 16,
upload: 17, historyList: 17,
upload: 18,
blank3: 19
}, },
customNavbarHidden: [], customNavbarHidden: [],
playerShadow: false, playerShadow: false,

View File

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

View File

@ -80,24 +80,26 @@ export const settings = {
customNavbarCompact: false, customNavbarCompact: false,
customNavbarBlur: false, customNavbarBlur: false,
customNavbarOrder: { customNavbarOrder: {
logo: 0, blank1: 0,
category: 1, logo: 1,
rankingLink: 2, category: 2,
drawingLink: 3, rankingLink: 3,
musicLink: 4, drawingLink: 4,
gamesIframe: 5, musicLink: 5,
livesIframe: 6, gamesIframe: 6,
shopLink: 7, livesIframe: 7,
mangaLink: 8, shopLink: 8,
blank: 9, mangaLink: 9,
search: 10, blank2: 10,
userInfo: 11, search: 11,
messages: 12, userInfo: 12,
activities: 13, messages: 13,
watchlaterList: 14, activities: 14,
favoritesList: 15, watchlaterList: 15,
historyList: 16, favoritesList: 16,
upload: 17, historyList: 17,
upload: 18,
blank3: 19
}, },
customNavbarHidden: [], customNavbarHidden: [],
playerShadow: false, 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; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin: 0 5%; margin: 0;
height: 100%; height: 100%;
flex-grow: 1; flex-grow: 1;
} }
@ -135,6 +135,17 @@ li.nav-item[report-id='playpage_dynamic'] .i-frame,
align-items: center; align-items: center;
color: inherit; 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) .custom-navbar>ul>li:not(.disabled)
{ {
cursor: pointer; cursor: pointer;

View File

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