Skip to content

Commit

Permalink
Merge pull request #2163 from raszpl/patch-2
Browse files Browse the repository at this point in the history
Update satus.js correct Menu load timing problems #2160
  • Loading branch information
ImprovedTube authored May 6, 2024
2 parents 2df3a5e + 994ced4 commit 75ee439
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 38 deletions.
14 changes: 7 additions & 7 deletions menu/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width">
<title>ImprovedTube</title><style>body{width:320px;max-width:320px; margin:0; height:600px;max-height:600px;"}</style>
<script src="satus.js"></script>
<script src="index.js"></script>
<title>ImprovedTube</title><style>body{width:320px;max-width:320px; margin:0; height:600px;max-height:600px;"}</style>
<script src="satus.js"></script>
<script src="skeleton.js"></script>
<script src="functions.js"></script>
<script src="functions.js"></script>
<script src="skeleton-parts/search.js"></script>
<script src="skeleton-parts/active-features.js"></script>
<script src="skeleton-parts/settings.js"></script>
Expand All @@ -19,6 +18,7 @@
<script src="skeleton-parts/blocklist.js"></script>
<script src="skeleton-parts/analyzer.js"></script>
<script src="skeleton-parts/dark-light-switch.js"></script>
<script defer src="index.js"></script>
<link rel="stylesheet" href="satus.css">
<link rel="stylesheet" href="styles/home.css">
<link rel="stylesheet" href="styles/appearance.css">
Expand All @@ -30,6 +30,6 @@
<link rel="stylesheet" href="styles/fonts.css">
<link rel="stylesheet" href="styles/mixer.css">
<link rel="stylesheet" href="styles/settings.css">
<link rel="stylesheet" href="styles/themes.css"></head><body></body></html>


<link rel="stylesheet" href="styles/themes.css">
</head><body><div id="loading" style="animation: 4s linear 0s 1 normal none running fadeIn; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 3px solid rgb(182, 233, 255); border-radius: 80px; padding: 37px; color: rgb(120, 147, 161);">...asking your browser what settings you made here before...</div>
</body></html>
17 changes: 2 additions & 15 deletions menu/index.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
/*--------------------------------------------------------------
>>> INDEX:
----------------------------------------------------------------
# Global variable
# Initialization
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# GLOBAL VARIABLE
--------------------------------------------------------------*/

var extension = {
skeleton: {}
};


/*--------------------------------------------------------------
----------------------------------------------------------------
# Global variable //moved to skeleton.js: (var extension = {skeleton:{} };
# INITIALIZATION
--------------------------------------------------------------*/

satus.storage.import(function (items) {
var language = items.language;
if (!language || language === 'default') { language = false;}
Expand Down
6 changes: 1 addition & 5 deletions menu/satus.js
Original file line number Diff line number Diff line change
Expand Up @@ -911,18 +911,14 @@ satus.storage.import = function(keys, callback) {
callback = keys;
keys = undefined;
}
const overlay = document.createElement('div');
overlay.style.cssText = 'animation: fadeIn 4s linear; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 3px solid rgba(182, 233, 255, 1); border-radius: 80px; padding: 37px; color: rgba(120, 147, 161, 1);';
overlay.textContent = '...asking your browser what settings you made here before...';
(document.body || document.documentElement).appendChild(overlay);
chrome.storage.local.get(keys || null, function(items) {
for (var key in items) {
self.data[key] = items[key];
}
// satus.log('STORAGE: data was successfully imported');
satus.events.trigger('storage-import');
if (callback) { callback(items); }
overlay.style.display = 'none';
loading.style.display = 'none';
});
};
/*--------------------------------------------------------------
Expand Down
17 changes: 6 additions & 11 deletions menu/skeleton.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@
# Header
# Main
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# BASE
--------------------------------------------------------------*/

extension.skeleton = {
component: 'base',
search: false,
searchPosition: 0
var extension = {
skeleton: {
component: 'base',
search: false,
searchPosition: 0
}
};


/*--------------------------------------------------------------
# HEADER
--------------------------------------------------------------*/

extension.skeleton.header = {
component: 'header',

Expand Down Expand Up @@ -201,11 +198,9 @@ extension.skeleton.header = {
}
};


/*--------------------------------------------------------------
# MAIN
--------------------------------------------------------------*/

extension.skeleton.main = {
component: 'main',

Expand Down

0 comments on commit 75ee439

Please # to comment.