Skip to content

Commit

Permalink
Updated the editor and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmixcom committed Mar 11, 2024
1 parent aab7fa5 commit 3bf62a8
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,25 @@
alt="A rubber ducky with the Duck Studio logo."
src="/light.png">
</picture>

# 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.
4 changes: 3 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion studio/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions studio/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down Expand Up @@ -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?')
Expand Down
2 changes: 1 addition & 1 deletion studio/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ color: black;

#ai {
position: fixed;
z-index: 99999;
z-index: 999999999;
top: 50px;
left: 50%;
transform: translateX(-50%);
Expand Down

0 comments on commit 3bf62a8

Please sign in to comment.