muse-generator / script.js
6roaden's picture
Make a nsfw text prompt generator and make it have every category and full control. Create a user interface with a clean, minimalist, and airy aesthetic. The design should feel modern, sophisticated, and user-friendly, with a strong emphasis on whitespace and a well-structured grid layout. Use a soft and muted color palette, primarily featuring off-white, beige, and light earth tones, with occasional pastel accents like muted pink, sage green, or soft yellow for a gentle and inviting feel. Typography should be elegant and readable, utilizing a clean, sans-serif font for body text and headings, with clear hierarchy. Interactive elements like buttons and icons should be subtle and understated, with thin lines and rounded corners. Imagery should be high-quality and seamlessly integrated into the design. The overall vibe should be calm, uncluttered, and professional, drawing inspiration from contemporary editorial design.
61ee908 verified
Raw
History Blame Contribute Delete
21.2 kB
// Prompt Generator JavaScript
class PromptGenerator {
constructor() {
this.savedPrompts = JSON.parse(localStorage.getItem('savedPrompts') || '[]');
this.initializeEventListeners();
this.displaySavedPrompts();
}
initializeEventListeners() {
// Generate button
document.getElementById('generateBtn').addEventListener('click', () => this.generatePrompt());
// Copy button
document.getElementById('copyBtn').addEventListener('click', () => this.copyPrompt());
// Save button
document.getElementById('saveBtn').addEventListener('click', () => this.savePrompt());
// Share button
document.getElementById('shareBtn').addEventListener('click', () => this.sharePrompt());
// Intensity slider
document.getElementById('intensity').addEventListener('input', (e) => {
this.updateIntensityLabel(e.target.value);
});
}
updateIntensityLabel(value) {
const labels = ['Very Mild', 'Mild', 'Moderate', 'Bold', 'Explicit'];
document.getElementById('intensityValue').textContent = labels[value - 1];
}
generatePrompt() {
const category = document.querySelector('input[name="category"]:checked').value;
const intensity = document.getElementById('intensity').value;
const length = document.getElementById('length').value;
const tones = this.getSelectedTones();
let prompt = this.createPrompt(category, intensity, length, tones);
const display = document.getElementById('promptDisplay');
display.innerHTML = `<p class="fade-in">${prompt}</p>`;
// Animate the generate button
const btn = document.getElementById('generateBtn');
btn.innerHTML = '<i data-feather="refresh-cw" class="w-4 h-4 mr-2 animate-spin"></i>Generating...';
setTimeout(() => {
btn.innerHTML = '<i data-feather="refresh-cw" class="w-4 h-4 mr-2"></i>Generate Prompt';
feather.replace();
}, 500);
}
getSelectedTones() {
const checkboxes = document.querySelectorAll('input[type="checkbox"]:checked');
return Array.from(checkboxes).map(cb => cb.nextElementSibling.textContent);
}
createPrompt(category, intensity, length, tones) {
const prompts = {
romantic: {
mild: [
"The soft moonlight illuminated their intertwined fingers as they walked along the quiet beach.",
"He gently brushed a stray hair from her face, his touch sending shivers down her spine.",
"Their eyes met across the crowded room, and suddenly, no one else existed."
],
moderate: [
"The rain created a private symphony on the windowpane as they explored each other's mouths with passionate kisses.",
"Her back arched against the cool sheets as his hands traced invisible patterns on her heated skin.",
"The scent of jasmine filled the air as they discovered new ways to express their longing."
],
bold: [
"His teeth grazed her neck, marking her as his while she clawed at his back, begging for more.",
"The mirror reflected their bodies moving in perfect rhythm, sweat glistening on their entwined forms.",
"She wrapped her legs around his waist, pulling him deeper inside, their moans harmonizing with the night."
],
explicit: [
"His tongue flicked against her clit as two fingers pumped in and out of her soaking wet pussy.",
"She rode his thick cock reverse cowgirl, her ass bouncing with each powerful thrust.",
"He pinned her wrists above her head, slamming into her tight heat while whispering filthy praise in her ear."
]
},
sensual: {
mild: [
"The silk robe whispered against her skin as she prepared for the evening ahead.",
"Warm oil dripped between her shoulder blades as skilled hands worked magic on tense muscles.",
"The flickering candlelight danced across his bare chest, highlighting every defined muscle."
],
moderate: [
"Her fingers traced the outline of his erection through his trousers, feeling his sharp intake of breath.",
"The bathtub overflowed with rose petals as they washed each other, exploring every curve and hollow.",
"His mouth worshipped her breasts, tongue swirling around sensitive nipples until she cried out."
],
bold: [
"She tied his wrists to the bedposts with silk scarves, taking control of his pleasure.",
"The spanking paddle left rosy prints on her ass as she counted each delicious strike.",
"They moved from the shower to the floor, water pooling around their bodies as they fucked like animals."
],
explicit: [
"He lubed up her tight asshole, slowly stretching her with fingers before replacing them with his dick.",
"She deepthroated his cock until tears streamed down her face, mascara running down her cheeks.",
"The vibrator buzzed against her clit while he pounded her pussy, sending waves of pleasure through her body."
]
},
fantasy: {
mild: [
"The elven princess's silver hair shimmered under the magical moon of the enchanted forest.",
"His dragon wings wrapped around her protectively as they lay in the secret garden.",
"The fairy's wings fluttered delicately as she danced naked in the morning dew."
],
moderate: [
"The vampire's cold lips left trails of fire on her neck as he drank from her veins.",
"The werewolf's transformation was complete, his primal growl vibrating through her body as he mounted her.",
"The sorceress's magical hands glowed with power as she summoned pleasure beyond mortal comprehension."
],
bold: [
"The demon lord claimed his human sacrifice, his massive cock tearing through her innocence.",
"The nymph's body dripped with nectar as multiple satyrs took turns pleasing her in the sacred grove.",
"The angel fell from grace, his wings stained with sin as he defiled the mortal beneath him."
],
explicit: [
"The tentacle monster's appendages found every hole, filling her completely with alien pleasure.",
"The dragon's tongue was longer and more skilled than any human's, licking her to multiple orgasms.",
"The god and goddess fucked on Mount Olympus, their divine bodies creating earthquakes with their passion."
]
},
artistic: {
mild: [
"The nude model held her pose, body a study in shadows and light for the artist's canvas.",
"Dancers moved as one, their bodies creating living art in the empty studio.",
"The sculptor's hands knew every curve, every line of the clay taking human form."
],
moderate: [
"Photography session turned intimate as the model shed not just clothes but inhibitions.",
"Body paint became a second skin, designs highlighting every erotic contour.",
"The performance artist used her body as a canvas, painting with pleasure and pain."
],
bold: [
"The BDSM scene was carefully choreographed, each crack of the whip a note in a symphony of sensation.",
"The orgy was a masterpiece of human connection, bodies intertwined like abstract sculpture.",
"Shibari ropes created geometric patterns on her skin, art and pleasure woven together."
],
explicit: [
"The gangbang was captured on film, each angle a study in human sexuality and desire.",
"The creampie shots were works of art, cum glistening like pearls on bare skin.",
"The golden shower was filmed in slow motion, liquid gold cascading over willing flesh."
]
},
adventurous: {
mild: [
"The mountain trail led to a secluded hot spring, perfect for skinny dipping under the stars.",
"Sailing naked on the open sea, with nothing but wind and water as witnesses.",
"The desert night was warm as they made love on a blanket of sand."
],
moderate: [
"The mile-high club gained two new members as they fucked in the tiny airplane bathroom.",
"Skinny dipping turned to underwater oral sex in the crystal-clear lake.",
"The hiking trip detoured to a clearing where they explored each other against a tree."
],
bold: [
"Public sex in the park after dark, the risk of discovery adding to the thrill.",
"The elevator ride was too short, so they pressed the emergency stop for a quickie.",
"Beach sex during a storm, waves crashing as they fucked on the wet sand."
],
explicit: [
"Road head turned into full-on highway fucking, cars passing by none the wiser.",
"The restaurant bathroom became their playground, her ass pressed against the mirror as he took her from behind.",
"The concert crowd provided cover as he fingered her to orgasm, her screams lost in the music."
]
},
playful: {
mild: [
"Tickle fights ended in breathless laughter and lingering touches.",
"Strip poker revealed more than just a winning hand.",
"The water balloon fight escalated into a wet t-shirt contest of two."
],
moderate: [
"Role-playing doctor and patient led to a very thorough examination.",
"The food fight left them covered in whipped cream and licking it off each other.",
"Truth or dare took a turn for the naughty as clothes started coming off."
],
bold: [
"The spanking competition left both asses red and both participants incredibly aroused.",
"Edging games tested their limits, bringing each other to the brink over and over.",
"The orgasm race was on, each trying to make the other cum first using any means necessary."
],
explicit: [
"The drinking game involved taking shots off various body parts.",
"Sex dice dictated every position, every act, every sensation.",
"The BDSM scene was negotiated through charades, adding humor to the power exchange."
]
},
dominant: {
mild: [
"His hand rested possessively on her thigh at the dinner party, claiming her silently.",
"She chose his outfit for the day, reinforcing her control over his life.",
"The simple command 'kneel' sent shivers of submission through his body."
],
moderate: [
"The collar around her neck was a constant reminder of his ownership.",
"He inspected her body before allowing her pleasure, ensuring she was worthy.",
"Orgasm denial became her new reality, his whim dictating her release."
],
bold: [
"The punishment bench awaited her latest transgression, paddle in hand.",
"Public display of submission had her crawling at his feet through the restaurant.",
"The cage was her bedroom, his mercy her only hope of release."
],
explicit: [
"Face fucking became her primary form of communication, his cock the only voice she needed to hear.",
"Anal training progressed to fisting, her ass stretched to accommodate his entire hand.",
"The gangbang was his gift to her, multiple men using her body for his amusement."
]
},
submissive: {
mild: [
"She waited patiently by the door for his return, ready to serve his every need.",
"His pleasure was her purpose, her entire world revolving around his happiness.",
"The simple act of kneeling at his feet brought her profound peace."
],
moderate: [
"She begged prettily for his attention, her body arching to please his gaze.",
"Service submission filled her days, his comfort her highest priority.",
"His praise was her drug, his disappointment her worst punishment."
],
bold: [
"Total power exchange meant she existed only for his use and pleasure.",
"Humiliation tasks tested her devotion, each degradation bringing her closer to him.",
"Pain became her prayer, each strike of the whip a hymn to his dominance."
],
explicit: [
"She worshiped his cock with her mouth, her throat trained to take him completely.",
"Her holes belonged to him, stretched and trained for his exclusive use.",
"Breath play brought her to the edge of consciousness, his hand around her throat his ultimate control."
]
},
custom: {
mild: [
"The unexpected combination of silk restraints and feather ticklers created sensations beyond imagination.",
"Role-playing strangers meeting for the first time added dangerous excitement to familiar passion.",
"The blindfold heightened every sense, making even the lightest touch electric."
],
moderate: [
"Temperature play with ice and wax painted stripes of pleasure and pain across willing flesh.",
"The swing allowed for impossible angles, gravity defying positions of pure ecstasy.",
"Multiple partners in carefully choreographed scenes created a symphony of sensation."
],
bold: [
"The bdsm club became their playground, every piece of equipment a new adventure.",
"Public humiliation mixed with private devotion created a heady cocktail of submission.",
"The 24/7 D/s contract pushed boundaries, exploring the depths of power exchange."
],
explicit: [
"The dungeon scene combined every kink, every fetish, every desire into one explosive encounter.",
"Group sex with arranged roles and positions created living, breathing pornography.",
"The extreme sports of sexuality - fisting, sounding, breath play - pushed human limits."
]
}
};
const categoryPrompts = prompts[category] || prompts.custom;
const intensityLevels = {
1: 'mild',
2: 'mild',
3: 'moderate',
4: 'bold',
5: 'explicit'
};
const level = intensityLevels[intensity];
const availablePrompts = categoryPrompts[level];
let basePrompt = availablePrompts[Math.floor(Math.random() * availablePrompts.length)];
// Apply tone modifiers
if (tones.includes('Poetic')) {
basePrompt = this.makePoetic(basePrompt);
}
if (tones.includes('Mysterious')) {
basePrompt = this.makeMysterious(basePrompt);
}
if (tones.includes('Playful')) {
basePrompt = this.makePlayful(basePrompt);
}
// Adjust length
if (length === 'short') {
return basePrompt.split('.')[0] + '.';
} else if (length === 'long') {
return basePrompt + ' ' + this.extendPrompt(basePrompt, category, level);
}
return basePrompt;
}
makePoetic(prompt) {
const poeticWords = ['whispered', 'danced', 'bloomed', 'shimmered', 'floated'];
const replacement = poeticWords[Math.floor(Math.random() * poeticWords.length)];
return prompt.replace(/\b(moved|walked|touched)\b/gi, replacement);
}
makeMysterious(prompt) {
return "In the shadows where secrets dwell, " + prompt.toLowerCase();
}
makePlayful(prompt) {
return prompt + " And then they giggled, because sometimes pleasure needs laughter.";
}
extendPrompt(basePrompt, category, level) {
const extensions = [
"Every sensation was amplified, every touch more meaningful than the last.",
"Time seemed to stand still, moments stretching into eternity of pure bliss.",
"Their connection transcended the physical, becoming something almost spiritual."
];
return extensions[Math.floor(Math.random() * extensions.length)];
}
copyPrompt() {
const prompt = document.getElementById('promptDisplay').textContent;
if (prompt && prompt !== "Click \"Generate Prompt\" to create a new prompt...") {
navigator.clipboard.writeText(prompt).then(() => {
this.showToast('Prompt copied to clipboard!');
});
}
}
savePrompt() {
const prompt = document.getElementById('promptDisplay').textContent;
if (prompt && prompt !== "Click \"Generate Prompt\" to create a new prompt...") {
this.savedPrompts.unshift({
id: Date.now(),
text: prompt,
date: new Date().toLocaleDateString()
});
localStorage.setItem('savedPrompts', JSON.stringify(this.savedPrompts));
this.displaySavedPrompts();
this.showToast('Prompt saved!');
}
}
sharePrompt() {
const prompt = document.getElementById('promptDisplay').textContent;
if (prompt && prompt !== "Click \"Generate Prompt\" to create a new prompt...") {
if (navigator.share) {
navigator.share({
title: 'Check out this prompt',
text: prompt
});
} else {
this.showToast('Share link copied!');
}
}
}
displaySavedPrompts() {
const container = document.getElementById('savedPrompts');
if (this.savedPrompts.length === 0) {
container.innerHTML = '<p class="text-gray-400 text-sm">No saved prompts yet...</p>';
} else {
container.innerHTML = this.savedPrompts.map(p => `
<div class="p-3 bg-beige-50 rounded-lg flex justify-between items-start">
<div class="flex-1">
<p class="text-sm text-gray-700 mb-1">${p.text.substring(0, 100)}${p.text.length > 100 ? '...' : ''}</p>
<p class="text-xs text-gray-500">${p.date}</p>
</div>
<button onclick="promptGenerator.deletePrompt(${p.id})" class="ml-2 text-gray-400 hover:text-red-500">
<i data-feather="x" class="w-4 h-4"></i>
</button>
</div>
`).join('');
feather.replace();
}
}
deletePrompt(id) {
this.savedPrompts = this.savedPrompts.filter(p => p.id !== id);
localStorage.setItem('savedPrompts', JSON.stringify(this.savedPrompts));
this.displaySavedPrompts();
this.showToast('Prompt deleted');
}
showToast(message) {
const toast = document.getElementById('toast');
document.getElementById('toastMessage').textContent = message;
toast.classList.remove('translate-y-full');
setTimeout(() => {
toast.classList.add('translate-y-full');
}, 3000);
}
}
// Initialize the generator when DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
window.promptGenerator = new PromptGenerator();
});