Skip to content

Commit

Permalink
old iphone fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Latourelle authored and Will Latourelle committed May 7, 2020
1 parent 7bdcefa commit 801231a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions dist/animated-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,12 +501,17 @@ function processDefaultBackground(temp_enabled) {
}

if (view_node || view_node_panel) {
//required because ios pre 13.4 bitches out if there is nullish coalescing operator ('??')
var iphone_bullshit_fixer = view_node;
if(!iphone_bullshit_fixer){
iphone_bullshit_fixer = view_node_panel;
}
if (temp_enabled) {
removeDefaultBackground(view_node ?? view_node_panel);
removeDefaultBackground(iphone_bullshit_fixer);
DEBUG_MESSAGE("Removing view background for configuration:", currentConfig(), true);
}
else {
restoreDefaultBackground(view_node ?? view_node_panel);
restoreDefaultBackground(iphone_bullshit_fixer);
if (current_config && current_config.reason) {
DEBUG_MESSAGE("Current config is disabled because " + current_config.reason, null, true);
}
Expand Down Expand Up @@ -594,6 +599,11 @@ function run() {
renderBackgroundHTML();
}
}

if(!View){
restart();
return;
}

View_Observer.observe(View, {
characterData: true,
Expand All @@ -620,6 +630,7 @@ function run() {
}

function restart() {
clearInterval(wait_interval);
var wait_interval = setInterval(() => {
getVars()
if (Hui) {
Expand Down

0 comments on commit 801231a

Please sign in to comment.