From 2538c91876455fe96febf441fc8dde20f2606023 Mon Sep 17 00:00:00 2001 From: Agando Date: Thu, 9 Jul 2026 06:00:32 +0200 Subject: auto: 2026-07-09_06:00 changes --- modules/core/module-duckduckgo.js | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 modules/core/module-duckduckgo.js (limited to 'modules/core/module-duckduckgo.js') diff --git a/modules/core/module-duckduckgo.js b/modules/core/module-duckduckgo.js deleted file mode 100644 index c443b72..0000000 --- a/modules/core/module-duckduckgo.js +++ /dev/null @@ -1,38 +0,0 @@ -// Extracted from newOS4 index.html — DuckDuckGoModule - class DuckDuckGoModule { - constructor() { - this.commands = {}; - this.terminal = null; - } - getHelpInfo() { - return { - 'ddg': 'ddg — Search DuckDuckGo (opens query in new tab)', - 'duck': 'duck — Alias for ddg', - }; - } - registerCommands() { - this.commands['ddg'] = (args) => this.search(args); - this.commands['duck'] = (args) => this.search(args); - } - async search(args) { - if (!args[0]) { - this.terminal.print("Usage: ddg ", "warning"); - this.terminal.print("Example: ddg javascript tutorials", "info"); - this.terminal.print("Note: Due to CORS, results may be limited. Try 'search' command for better results.", "warning"); - return; - } - const query = args.join(' '); - this.terminal.print(`šŸ¦† DuckDuckGo Search: ${query}`, "info"); - - // DuckDuckGo doesn't have a public API, so we provide alternatives - this.terminal.print("āš ļø DuckDuckGo doesn't provide a public API for direct access.", "warning"); - this.terminal.print("Opening search in new tab...", "info"); - - // Open in new tab as fallback - const ddgUrl = `https://duckduckgo.com/?q=${encodeURIComponent(query)}`; - window.open(ddgUrl, '_blank'); - - this.terminal.print(`\nšŸ’” Alternative: Use 'search ' for SearXNG (privacy-focused)`, "info"); - this.terminal.print(`šŸ”— Direct link: ${ddgUrl}`, "info"); - } - } -- cgit v1.2.3