diff --git a/background/settings.ts b/background/settings.ts
index 721ee0305..1d074db43 100644
--- a/background/settings.ts
+++ b/background/settings.ts
@@ -365,6 +365,7 @@ saladict@crimx.com`
localeEncoding: "gbk",
mouseReachable: true,
/** mutable */ newTabUrl: "",
+ userDefinedNewTab: "",
nextPatterns: "\u4e0b\u4e00\u5c01,\u4e0b\u9875,\u4e0b\u4e00\u9875,\u4e0b\u4e00\u7ae0,\u540e\u4e00\u9875\
,\u4e0b\u4e00\u5f20,next,more,newer,>,\u203a,\u2192,\xbb,\u226b,>>",
notifyUpdate: true,
diff --git a/pages/blank.html b/pages/blank.html
index f853a9653..8cc6f1f6a 100644
--- a/pages/blank.html
+++ b/pages/blank.html
@@ -1,6 +1,8 @@
-
-Blank Page
-
-
+
+ Blank Page
+
+
+
+
diff --git a/pages/loader.ts b/pages/loader.ts
index 0e3ad8d08..8d8e3e2c4 100644
--- a/pages/loader.ts
+++ b/pages/loader.ts
@@ -84,6 +84,12 @@ var VApi: VApiTy | undefined, VimiumInjector: VimiumInjectorTy | undefined | nul
}
return browser_.runtime.lastError
})
+ storage.get("userDefinedNewTab", (res): void => {
+ if (!res.userDefinedNewTab) { return }
+ const userContentBody = document.getElementById('vimium-user-content');
+ if (!userContentBody) { return }
+ userContentBody.insertAdjacentHTML('beforeend', res.userDefinedNewTab);
+ });
if (browser_.i18n.getMessage("lang1")) {
const s = browser_.i18n.getMessage("vblank")
s && (document.title = s)
diff --git a/pages/options.html b/pages/options.html
index ede5705ae..db7c2789d 100644
--- a/pages/options.html
+++ b/pages/options.html
@@ -520,6 +520,17 @@
+
+ Custom HTML/CSS for blank page |
+
+
+ |
+
+ If the "New tab URL" is configured on "pages/blank.html", it can be customized with static content.
+ |
+
Previous patterns |
diff --git a/typings/vimium_c.d.ts b/typings/vimium_c.d.ts
index 6269cd7e3..ff3bb6a66 100644
--- a/typings/vimium_c.d.ts
+++ b/typings/vimium_c.d.ts
@@ -343,6 +343,7 @@ declare namespace SettingsNS {
grabBackFocus: boolean;
showAdvancedCommands: boolean;
vomnibarOptions: SelectNVType & VomnibarBackendItems;
+ userDefinedNewTab: string;
}
interface FrontUpdateAllowedSettings {
showAdvancedCommands: 0;
|