[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",
"version": "5.27.2",
"version": "5.28.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"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.",
"main": "index.js",
"scripts": {

View File

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

View File

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

View File

@ -2,7 +2,7 @@
"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.",
"version": "5.27.2",
"version": "5.28.0",
"manifest_version": 2,
"chrome_url_overrides": {
"newtab": "index.html"