From 3bf62a81b1baff9f2321fa8ae6a7f5ef526c0957 Mon Sep 17 00:00:00 2001 From: Lava <63625087+cosmixcom@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:21:40 +0000 Subject: [PATCH] Updated the editor and README.md --- README.md | 22 ++++++++++++++++++++++ script.js | 4 +++- studio/index.html | 2 +- studio/script.js | 8 ++++++++ studio/style.css | 2 +- 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cfeeb81..a42c9d8 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,25 @@ alt="A rubber ducky with the Duck Studio logo." src="/light.png"> + +# Ducky Studio + +Ducky Studio is an integrated development environment (aka IDE) that makes development in the Rubber Ducky 1.0 language simple. You can refer to the docs for Rubber Ducky 1.0 [here](https://web.archive.org/web/20220816200129/http://github.com/hak5darren/USB-Rubber-Ducky/wiki/Duckyscript#ducky-script). + +## Features + +Here are all the current and upcoming features along with their roadmap. + +| Feature | Roadmap | +| ------- | ------- | +| Syntax Highlighting | ✅ | +| Integrated AI | ✅ | +| Documentation | - (1-2 Weeks) | +| Export to TXT | ✅ | +| AI Model Choice | ❎ (1-2 Weeks) | + +## Disclaimer + +Ducky Studio and its affiliates disclaim all liability for the software and anything created on or in association with it. We also disclaim all liability for software loaded on to it or anything or users do with the software. + +By using Ducky Studio, you kindly agree to the above disclaimer and license agreement. \ No newline at end of file diff --git a/script.js b/script.js index ce93361..d0cc5b3 100644 --- a/script.js +++ b/script.js @@ -4,6 +4,8 @@ function runFunctionForProjectKeys() { if (key.startsWith("project-")) { // Run your function here for keys starting with "project-" // For example: + console.log(String(key).split('project-')[1]) + const project = String(key).split('project-')[1] // yourFunction(localStorage.getItem(key)); console.log("Key:", key); const div = document.createElement('div') @@ -12,7 +14,7 @@ function runFunctionForProjectKeys() { document.body.append(div) div.addEventListener('click', () => { - window.location = `/studio/?project=${String(key).split('project-')[1]}` + window.location = `/studio/?project=${project}` }) // Execute your function here } diff --git a/studio/index.html b/studio/index.html index 81693b8..b33a82c 100644 --- a/studio/index.html +++ b/studio/index.html @@ -105,7 +105,7 @@ function save() { if (closed === false) { //window.prompt("File name"); - var savePrompt = `xploit-ducky-${Math.random().toString(36).substring(7)}` + var savePrompt = `duckystudio-${Math.random().toString(36).substring(7)}` if (savePrompt !== null) { var blob = new Blob([editor.getValue()], {type: "text/plain;charset=utf-8"}); var url = URL.createObjectURL(blob); diff --git a/studio/script.js b/studio/script.js index cbe4c5a..dfd7532 100644 --- a/studio/script.js +++ b/studio/script.js @@ -204,6 +204,7 @@ document.getElementById('aiForm').addEventListener('submit', async (event) => { preamble: aiBot, model: 'command', temperature: 0.9, + connectors: [{"id": "web-search"}] }); document.getElementById('ai').value = '' @@ -264,6 +265,13 @@ window.addEventListener('keydown', async function(event) { if (event.ctrlKey && event.key === 'i') { // Your code to execute on Ctrl+I document.getElementById('ai').select() + document.getElementById('ai').focus() + document.getElementById('ai').click() + setTimeout(function() { + document.getElementById('ai').select() + document.getElementById('ai').focus() + document.getElementById('ai').click() + }, 500) document.getElementById('aiForm').style.display = 'block'; // const prompt = window.prompt('What would you like to ask AI?') diff --git a/studio/style.css b/studio/style.css index a6b9e6f..4274798 100644 --- a/studio/style.css +++ b/studio/style.css @@ -78,7 +78,7 @@ color: black; #ai { position: fixed; - z-index: 99999; + z-index: 999999999; top: 50px; left: 50%; transform: translateX(-50%);