[design] change page fade in from load event to timer to prevent slow netweork delaying content loading

This commit is contained in:
zombieFox 2020-04-27 11:21:17 +01:00
parent 02171b89da
commit a773114d1b
5 changed files with 10 additions and 11 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "nightTab", "name": "nightTab",
"version": "5.27.2", "version": "5.28.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "nightTab", "name": "nightTab",
"version": "5.27.2", "version": "5.28.0",
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -1,17 +1,16 @@
var ready = (function() { var ready = (function() {
var _timer = null;
var bind = {}; var bind = {};
bind.loaded = { bind.loaded = {
func: function() { func: function() {
render.loaded(); render.loaded();
bind.loaded.remove(); clearTimeout(_timer);
}, },
add: function() { timer: function() {
window.addEventListener("load", bind.loaded.func, false); _timer = setTimeout(bind.loaded.func, 300);
},
remove: function() {
window.removeEventListener("load", bind.loaded.func);
} }
}; };
@ -23,7 +22,7 @@ var ready = (function() {
}; };
var init = function() { var init = function() {
bind.loaded.add(); bind.loaded.timer();
}; };
// exposed methods // exposed methods

View File

@ -1,6 +1,6 @@
var version = (function() { var version = (function() {
var current = "5.27.2"; var current = "5.28.0";
var name = "Zonked Tarsier"; var name = "Zonked Tarsier";

View File

@ -2,7 +2,7 @@
"name": "nightTab", "name": "nightTab",
"short_name": "nightTab", "short_name": "nightTab",
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
"version": "5.27.2", "version": "5.28.0",
"manifest_version": 2, "manifest_version": 2,
"chrome_url_overrides": { "chrome_url_overrides": {
"newtab": "index.html" "newtab": "index.html"