mirror of
https://github.com/Ujwal223/FocusGram.git
synced 2026-05-27 01:12:23 +02:00
Progress SAve- downloader,blur,ghost mode(Partially) works
This commit is contained in:
+3
-21
@@ -3,7 +3,6 @@ import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
enum ScriptId {
|
||||
ghostMode,
|
||||
themeDetector,
|
||||
adBlockerDom,
|
||||
contentHider,
|
||||
fetchInterceptor,
|
||||
autoplayBlocker,
|
||||
@@ -32,18 +31,11 @@ class InstaScript {
|
||||
class ScriptRegistry {
|
||||
static final List<InstaScript> all = [
|
||||
// ── DOCUMENT_START — must be before IG's JS loads ──
|
||||
InstaScript(
|
||||
id: ScriptId.ghostMode,
|
||||
name: 'Ghost Mode',
|
||||
description: 'Blocks story seen, message seen, and online status signals.',
|
||||
assetPath: 'assets/scripts/ghost_mode.js',
|
||||
injectionTime: UserScriptInjectionTime.AT_DOCUMENT_START,
|
||||
enabled: false,
|
||||
),
|
||||
InstaScript(
|
||||
id: ScriptId.fetchInterceptor,
|
||||
name: 'Fetch Interceptor',
|
||||
description: 'Unified feed filter: blocks ads, sponsored, suggested, videos via GraphQL interception.',
|
||||
name: 'Ad & Content Blocker',
|
||||
description:
|
||||
'Blocks ads, sponsored, suggested content, videos, and prevents autoplay via GraphQL interception.',
|
||||
assetPath: 'assets/scripts/fetch_interceptor.js',
|
||||
injectionTime: UserScriptInjectionTime.AT_DOCUMENT_START,
|
||||
enabled: false,
|
||||
@@ -66,14 +58,6 @@ class ScriptRegistry {
|
||||
injectionTime: UserScriptInjectionTime.AT_DOCUMENT_END,
|
||||
enabled: true, // always on — needed for native feel
|
||||
),
|
||||
InstaScript(
|
||||
id: ScriptId.adBlockerDom,
|
||||
name: 'DOM Ad Blocker',
|
||||
description: 'Removes sponsored posts and tracking elements from feed (legacy - use Fetch Interceptor instead).',
|
||||
assetPath: 'assets/scripts/ad_blocker_dom.js',
|
||||
injectionTime: UserScriptInjectionTime.AT_DOCUMENT_END,
|
||||
enabled: false,
|
||||
),
|
||||
InstaScript(
|
||||
id: ScriptId.contentHider,
|
||||
name: 'Content Hider',
|
||||
@@ -100,6 +84,4 @@ class ScriptRegistry {
|
||||
enabled: false,
|
||||
),
|
||||
];
|
||||
|
||||
static InstaScript byId(ScriptId id) => all.firstWhere((s) => s.id == id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user