Jesse311 yasirme commited on
Commit
e672998
·
verified ·
1 Parent(s): e2c4b18

Update index.html (#2)

Browse files

- Update index.html (8865cc23bb519124cd475d03d6eb4b2462dbb55d)


Co-authored-by: yasir <[email protected]>

Files changed (1) hide show
  1. index.html +4 -73
index.html CHANGED
@@ -37,14 +37,7 @@
37
  </script>
38
 
39
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&family=Poppins:wght@400;500;600&display=swap" rel="stylesheet">
40
- <script type='text/javascript'>
41
- window.smartlook||(function(d) {
42
- var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
43
- var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
44
- c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);
45
- })(document);
46
- smartlook('init', 'aa9463be7bcf3461cd111de8ed0dc6ede653881c', { region: 'eu' });
47
- </script>
48
 
49
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
50
 
@@ -325,7 +318,6 @@
325
  let hasRated = localStorage.getItem("hasRated")
326
  let feedbackSubmitted = false;
327
 
328
- const FORM_SPREE_ENDPOINT = 'https://formspree.io/f/xgvzqeed';
329
 
330
  const styleTemplates = {
331
  cinema: " Shot in native IMAX 65mm and ARRI ALEXA LF with anamorphic lenses, color graded in HDR10/Dolby Vision, mastered in 4K DCI, utilizing dynamic lighting, practical effects, deep depth of field, authentic set design, golden hour cinematography, and multi-cam Steadicam, drone, and gimbal setups for immersive wide-to-intimate shots",
@@ -582,9 +574,7 @@ GOAL: Generate prompts that produce realistic, natural-looking images by exploit
582
  const ratingStars = document.getElementById('ratingStars');
583
  const feedbackMessage = document.getElementById('feedbackMessage');
584
 
585
- function showFeedbackPopup() {
586
- feedbackPopup.classList.add('show');
587
- }
588
 
589
  function resetRating() {
590
  selectedRating = 0;
@@ -593,55 +583,9 @@ GOAL: Generate prompts that produce realistic, natural-looking images by exploit
593
  });
594
  }
595
 
596
- async function submitFeedback() {
597
- if (selectedRating === 0) {
598
- alert("Please select a rating from 1 to 5.");
599
- return;
600
- }
601
-
602
- const formData = {
603
- rating: selectedRating,
604
- message: feedbackMessage.value.trim() || 'No message provided.'
605
- };
606
-
607
- try {
608
- await fetch(FORM_SPREE_ENDPOINT, {
609
- method: 'POST',
610
- headers: {
611
- 'Content-Type': 'application/json',
612
- 'Accept': 'application/json'
613
- },
614
- body: JSON.stringify(formData)
615
- });
616
-
617
- alert('Thank you for your feedback!');
618
- feedbackPopup.classList.remove('show');
619
- feedbackSubmitted = true;
620
- feedbackMessage.value = '';
621
- resetRating();
622
-
623
- } catch (error) {
624
- console.error('Error submitting feedback:', error);
625
- alert('Failed to submit feedback. Please try again later.');
626
- }
627
- }
628
-
629
- ratingStars.addEventListener('click', (e) => {
630
- const clickedStar = e.target.closest('.fa-star');
631
- if (clickedStar) {
632
- selectedRating = parseInt(clickedStar.dataset.rating, 10);
633
- document.querySelectorAll('.rating-stars .fa-star').forEach(star => {
634
- if (parseInt(star.dataset.rating, 10) <= selectedRating) {
635
- star.classList.add('filled');
636
- } else {
637
- star.classList.remove('filled');
638
- }
639
- });
640
- }
641
- });
642
 
643
- document.getElementById('submitFeedbackBtn').addEventListener('click', submitFeedback);
644
 
 
645
  async function generateImage() {
646
  if (isGenerating) return;
647
  const rawPrompt = promptEl.value.trim();
@@ -676,19 +620,7 @@ GOAL: Generate prompts that produce realistic, natural-looking images by exploit
676
  finalPrompt += ' ' + styleTemplates[selectedStyle];
677
  }
678
  }
679
- try {
680
- fetch("https://formspree.io/f/xgvzqeed", {
681
- method: "POST",
682
- headers: {
683
- "Content-Type": "application/json"
684
- },
685
- body: JSON.stringify({
686
- prompt: finalPrompt
687
- })
688
- });
689
- } catch (e) {
690
-
691
- }
692
  const model = encodeURIComponent(document.getElementById('model').value || 'turbo');
693
  const width = Math.max(64, Math.min(2048, Number(document.getElementById('width').value) || 1024));
694
  const height = Math.max(64, Math.min(2048, Number(document.getElementById('height').value) || 1024));
@@ -726,7 +658,6 @@ GOAL: Generate prompts that produce realistic, natural-looking images by exploit
726
  });
727
  window.addEventListener('beforeunload', saveSettingsToStorage);
728
  </script>
729
- <script data-collect-dnt="true" async src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
730
 
731
  </body>
732
  </html>
 
37
  </script>
38
 
39
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&family=Poppins:wght@400;500;600&display=swap" rel="stylesheet">
40
+
 
 
 
 
 
 
 
41
 
42
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
43
 
 
318
  let hasRated = localStorage.getItem("hasRated")
319
  let feedbackSubmitted = false;
320
 
 
321
 
322
  const styleTemplates = {
323
  cinema: " Shot in native IMAX 65mm and ARRI ALEXA LF with anamorphic lenses, color graded in HDR10/Dolby Vision, mastered in 4K DCI, utilizing dynamic lighting, practical effects, deep depth of field, authentic set design, golden hour cinematography, and multi-cam Steadicam, drone, and gimbal setups for immersive wide-to-intimate shots",
 
574
  const ratingStars = document.getElementById('ratingStars');
575
  const feedbackMessage = document.getElementById('feedbackMessage');
576
 
577
+
 
 
578
 
579
  function resetRating() {
580
  selectedRating = 0;
 
583
  });
584
  }
585
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
586
 
 
587
 
588
+
589
  async function generateImage() {
590
  if (isGenerating) return;
591
  const rawPrompt = promptEl.value.trim();
 
620
  finalPrompt += ' ' + styleTemplates[selectedStyle];
621
  }
622
  }
623
+
 
 
 
 
 
 
 
 
 
 
 
 
624
  const model = encodeURIComponent(document.getElementById('model').value || 'turbo');
625
  const width = Math.max(64, Math.min(2048, Number(document.getElementById('width').value) || 1024));
626
  const height = Math.max(64, Math.min(2048, Number(document.getElementById('height').value) || 1024));
 
658
  });
659
  window.addEventListener('beforeunload', saveSettingsToStorage);
660
  </script>
 
661
 
662
  </body>
663
  </html>