mirror of
https://github.com/zombieFox/nightTab.git
synced 2024-11-27 18:43:11 +01:00
dismiss
This commit is contained in:
parent
989c79afb8
commit
ad9c0ed9a9
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "nightTab",
|
||||
"version": "7.6.0",
|
||||
"version": "7.7.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "nightTab",
|
||||
"version": "7.6.0",
|
||||
"version": "7.7.0",
|
||||
"license": "GPL-3",
|
||||
"devDependencies": {
|
||||
"copy-webpack-plugin": "^12.0.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nightTab",
|
||||
"version": "7.6.0",
|
||||
"version": "7.7.0",
|
||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks with nightTab.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -32,7 +32,6 @@ groupAndBookmark.render = () => {
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
group.sort.bind();
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { state } from '../state';
|
||||
import { data } from '../data';
|
||||
|
||||
import { Notification } from '../notification';
|
||||
|
||||
@ -29,16 +30,22 @@ layout.area = {
|
||||
|
||||
const body = document.querySelector('body');
|
||||
|
||||
if (!state.get.current().header.search.removalNotice) {
|
||||
|
||||
const notification = new Notification({
|
||||
children: [
|
||||
|
||||
complexNode({ tag: 'p', text: 'Search in nightTab will be removed to comply with a <a href="https://developer.chrome.com/blog/cws-policy-updates-2024" target="_blank">Chrome policy change</a>. Filtering bookmarks will remain. Read more about this change on the <a href="https://github.com/zombieFox/nightTab/discussions/460" target="_blank">nightTab repo</a>.', complexText: true })
|
||||
|
||||
]
|
||||
complexNode({ tag: 'p', text: 'Search in nightTab will be removed to comply with a <a href="https://developer.chrome.com/blog/cws-policy-updates-2024" target="_blank">Chrome policy change</a>. Filtering bookmarks will remain. Read more about this change on the <a href="https://github.com/zombieFox/nightTab/discussions/460" target="_blank">nightTab repo</a>.', attr: [{ key: 'class', value: 'small' }], complexText: true })
|
||||
],
|
||||
dismissAction: () => {
|
||||
state.get.current().header.search.removalNotice = true;
|
||||
data.save();
|
||||
}
|
||||
});
|
||||
|
||||
body.append(notification.notification());
|
||||
|
||||
};
|
||||
|
||||
body.append(layout.element.layout);
|
||||
|
||||
const resize = new ResizeObserver((entries) => {
|
||||
|
@ -6,6 +6,7 @@ import './index.css';
|
||||
|
||||
export const Notification = function ({
|
||||
children = [],
|
||||
dismissAction = false,
|
||||
} = {}) {
|
||||
|
||||
this.element = {
|
||||
@ -18,6 +19,13 @@ export const Notification = function ({
|
||||
size: 'small',
|
||||
style: ['ring'],
|
||||
func: () => {
|
||||
|
||||
if (dismissAction) {
|
||||
dismissAction();
|
||||
}
|
||||
|
||||
this.element.notification.remove();
|
||||
|
||||
}
|
||||
}),
|
||||
};
|
||||
|
@ -53,7 +53,8 @@ state.default = {
|
||||
text: { justify: 'center' },
|
||||
size: 100,
|
||||
newLine: false,
|
||||
newTab: false
|
||||
newTab: false,
|
||||
removalNotice: false
|
||||
},
|
||||
order: [],
|
||||
edit: false
|
||||
|
@ -627,6 +627,14 @@ update.mod['7.5.0'] = function(data) {
|
||||
|
||||
};
|
||||
|
||||
update.mod['7.7.0'] = function (data) {
|
||||
|
||||
data.state.header.search.removalNotice = false;
|
||||
|
||||
return data;
|
||||
|
||||
};
|
||||
|
||||
update.run = (data) => {
|
||||
|
||||
// loop over all updates in mod.all object
|
||||
|
@ -1,6 +1,6 @@
|
||||
export const version = {};
|
||||
|
||||
version.number = '7.6.0';
|
||||
version.number = '7.7.0';
|
||||
|
||||
version.name = 'Nebulous Lobster';
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "__MSG_appName__",
|
||||
"short_name": "__MSG_appShortName__",
|
||||
"description": "__MSG_appDescription__",
|
||||
"version": "7.6.0",
|
||||
"version": "7.7.0",
|
||||
"manifest_version": 3,
|
||||
"default_locale": "en_GB",
|
||||
"chrome_url_overrides": {
|
||||
|
Loading…
Reference in New Issue
Block a user