Skip to content

Commit

Permalink
[racehub] uses f1-dash instead of planetf1
Browse files Browse the repository at this point in the history
  • Loading branch information
BrightDV committed May 26, 2024
1 parent 3b343ed commit 46e653f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 33 deletions.
33 changes: 1 addition & 32 deletions lib/Screens/SessionWebView/unofficial_webview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,45 +35,14 @@ class _UnofficialWebviewScreenState extends State<UnofficialWebviewScreen> {
@override
void initState() {
super.initState();
if (!kIsWeb) {
ContentBlocker(
trigger: ContentBlockerTrigger(
urlFilter: ".*",
unlessDomain: ["live.planetf1.com"],
resourceType: [
ContentBlockerTriggerResourceType.SCRIPT,
ContentBlockerTriggerResourceType.RAW,
],
),
action: ContentBlockerAction(
type: ContentBlockerActionType.BLOCK,
),
);
List<String> selectors = [
".bs-sticky",
".bs-block",
".unic",
];
contentBlockers.add(
ContentBlocker(
trigger: ContentBlockerTrigger(
urlFilter: ".*",
),
action: ContentBlockerAction(
type: ContentBlockerActionType.CSS_DISPLAY_NONE,
selector: selectors.join(', '),
),
),
);
}
}

@override
Widget build(BuildContext context) {
return InAppWebView(
initialUrlRequest: URLRequest(
url: WebUri(
"https://live.planetf1.com/",
"https://f1-dash.com/dashboard",
),
),
initialSettings: InAppWebViewSettings(
Expand Down
2 changes: 1 addition & 1 deletion lib/Screens/session_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class _SessionScreenState extends State<SessionScreen> {
widget.sessionFullName,
),
),
body: widget.session.state == 'upcoming' && false ||
body: widget.session.state == 'upcoming' ||
widget.session.startTime.isAfter(DateTime.now())
? Column(
mainAxisAlignment: MainAxisAlignment.center,
Expand Down

0 comments on commit 46e653f

Please sign in to comment.