mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-06-26 04:21:38 +02:00
[design] change page fade in from load event to timer to prevent slow netweork delaying content loading
This commit is contained in:
parent
02171b89da
commit
a773114d1b
2
package-lock.json
generated
2
package-lock.json
generated
@ -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": {
|
||||||
|
@ -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": {
|
||||||
|
@ -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
|
||||||
|
@ -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";
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user