mirror of
https://github.com/Carbon-for-F1TV/Carbon-for-F1TV.git
synced 2026-11-11 01:10:09 +01:00
Automatically dismiss error BM1200 popup
This commit is contained in:
1 parent
47b705a934
commit
535004ae25
1 file changed
+10
-1
@@ -2,7 +2,7 @@
|
||||
// @name Carbon for F1TV
|
||||
// @namespace https://Carbon-for-F1TV.github.io/Carbon-for-F1TV/
|
||||
// @match https://f1tv.formula1.com/*
|
||||
// @version 1.0.9
|
||||
// @version 1.1.0
|
||||
// @author Carbon-for-F1TV
|
||||
// @description Enhance your F1TV experience
|
||||
// @require https://code.jquery.com/jquery-3.7.1.min.js
|
||||
@@ -187,6 +187,15 @@ if (carbon_mode == "popout") {
|
||||
$("#diff-to-target").text(diffToTarget);
|
||||
} else {
|
||||
log("can't sync, player not loaded");
|
||||
// check for error popup
|
||||
if ($(".modal-dialog .error-code").length > 0) {
|
||||
// if it's error BM1200, dismiss it
|
||||
if ($(".modal-dialog .error-code")[0].innerText == "(BM1200)") {
|
||||
log("dismissing error popup");
|
||||
$(".modal-dialog .btn-close")[0].click();
|
||||
$(".channel-switcher-controls-list li button")[0].click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
|
||||
|
||||
Reference in new issue
Block a user