sync2ai commited on
Commit
6e3f0df
·
verified ·
1 Parent(s): 07558c2

will this fully work?

Browse files
Files changed (8) hide show
  1. README.md +8 -5
  2. components/footer.js +62 -0
  3. components/navbar.js +76 -0
  4. index.html +90 -19
  5. manifest.json +23 -0
  6. script.js +125 -0
  7. style.css +21 -18
  8. sw.js +26 -0
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Phantom Caller Magic
3
- emoji: 🏆
4
- colorFrom: yellow
5
- colorTo: indigo
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: Phantom Caller Magic ✨
3
+ colorFrom: blue
4
+ colorTo: gray
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
components/footer.js ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ footer {
7
+ background: rgba(17, 24, 39, 0.8);
8
+ backdrop-filter: blur(10px);
9
+ color: rgba(255, 255, 255, 0.7);
10
+ padding: 2rem 1rem;
11
+ text-align: center;
12
+ margin-top: 4rem;
13
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
14
+ }
15
+ .footer-content {
16
+ max-width: 1200px;
17
+ margin: 0 auto;
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: 1rem;
21
+ }
22
+ .footer-links {
23
+ display: flex;
24
+ justify-content: center;
25
+ gap: 1.5rem;
26
+ margin-bottom: 1rem;
27
+ }
28
+ .footer-links a {
29
+ color: rgba(255, 255, 255, 0.7);
30
+ text-decoration: none;
31
+ transition: color 0.3s;
32
+ }
33
+ .footer-links a:hover {
34
+ color: #9F7AEA;
35
+ }
36
+ .copyright {
37
+ font-size: 0.9rem;
38
+ }
39
+ .disclaimer {
40
+ font-size: 0.8rem;
41
+ max-width: 800px;
42
+ margin: 0 auto;
43
+ color: rgba(255, 255, 255, 0.5);
44
+ }
45
+ </style>
46
+ <footer>
47
+ <div class="footer-content">
48
+ <div class="footer-links">
49
+ <a href="#"><i data-feather="file-text"></i> Terms</a>
50
+ <a href="#"><i data-feather="lock"></i> Privacy</a>
51
+ <a href="#"><i data-feather="mail"></i> Contact</a>
52
+ </div>
53
+ <p class="copyright">&copy; ${new Date().getFullYear()} Phantom Caller Magic. All rights reserved.</p>
54
+ <p class="disclaimer">
55
+ Note: This is a demonstration interface. Actual caller ID spoofing may be regulated or illegal in your jurisdiction.
56
+ </p>
57
+ </div>
58
+ </footer>
59
+ `;
60
+ }
61
+ }
62
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ nav {
7
+ background: rgba(17, 24, 39, 0.8);
8
+ backdrop-filter: blur(10px);
9
+ padding: 1.5rem;
10
+ display: flex;
11
+ justify-content: space-between;
12
+ align-items: center;
13
+ position: relative;
14
+ z-index: 50;
15
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
16
+ }
17
+ .logo {
18
+ color: white;
19
+ font-weight: bold;
20
+ font-size: 1.5rem;
21
+ background: linear-gradient(135deg, #9F7AEA 0%, #F687B3 100%);
22
+ -webkit-background-clip: text;
23
+ -webkit-text-fill-color: transparent;
24
+ }
25
+ ul {
26
+ display: flex;
27
+ gap: 1.5rem;
28
+ list-style: none;
29
+ margin: 0;
30
+ padding: 0;
31
+ }
32
+ a {
33
+ color: rgba(255, 255, 255, 0.8);
34
+ text-decoration: none;
35
+ transition: all 0.3s;
36
+ font-weight: 500;
37
+ display: flex;
38
+ align-items: center;
39
+ gap: 0.5rem;
40
+ }
41
+ a:hover {
42
+ color: #9F7AEA;
43
+ transform: translateY(-2px);
44
+ }
45
+ .nav-icon {
46
+ width: 20px;
47
+ height: 20px;
48
+ }
49
+ </style>
50
+ <nav>
51
+ <div class="logo">Phantom Caller ✨</div>
52
+ <ul>
53
+ <li>
54
+ <a href="#">
55
+ <i data-feather="user" class="nav-icon"></i>
56
+ Account
57
+ </a>
58
+ </li>
59
+ <li>
60
+ <a href="#">
61
+ <i data-feather="settings" class="nav-icon"></i>
62
+ Settings
63
+ </a>
64
+ </li>
65
+ <li>
66
+ <a href="#">
67
+ <i data-feather="help-circle" class="nav-icon"></i>
68
+ Help
69
+ </a>
70
+ </li>
71
+ </ul>
72
+ </nav>
73
+ `;
74
+ }
75
+ }
76
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,90 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <meta name="theme-color" content="#4B0082">
7
+ <meta name="description" content="Make calls with any caller ID you desire">
8
+ <link rel="manifest" href="/manifest.json">
9
+ <title>Phantom Caller | Spoof Calls</title>
10
+ <link rel="stylesheet" href="style.css">
11
+ <script src="https://cdn.tailwindcss.com"></script>
12
+ <script src="https://unpkg.com/feather-icons"></script>
13
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
14
+ </head>
15
+ <body class="bg-gray-900 text-white min-h-screen">
16
+ <custom-navbar></custom-navbar>
17
+
18
+ <main class="container mx-auto px-4 py-12">
19
+ <div id="vanta-bg" class="absolute inset-0 z-0"></div>
20
+
21
+ <div class="relative z-10 max-w-3xl mx-auto bg-gray-800 bg-opacity-70 backdrop-blur-lg rounded-xl shadow-2xl p-8">
22
+ <div class="text-center mb-10">
23
+ <h1 class="text-4xl md:text-5xl font-bold mb-4 bg-clip-text text-transparent bg-gradient-to-r from-purple-400 to-pink-600">
24
+ Phantom Caller Magic
25
+ </h1>
26
+ <p class="text-gray-300 text-lg">Make calls with any caller ID you desire</p>
27
+ </div>
28
+
29
+ <div class="space-y-8">
30
+ <div class="bg-gray-700 bg-opacity-50 p-6 rounded-lg">
31
+ <h2 class="text-2xl font-semibold mb-4 text-purple-300">New Call</h2>
32
+ <form id="callForm" class="space-y-4">
33
+ <div>
34
+ <label class="block text-gray-300 mb-2">Caller ID (Your Number)</label>
35
+ <input type="text" id="callerId" placeholder="+1 (555) 123-4567"
36
+ class="w-full px-4 py-3 bg-gray-800 border border-gray-600 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
37
+ </div>
38
+
39
+ <div>
40
+ <label class="block text-gray-300 mb-2">Recipient Number</label>
41
+ <input type="text" id="recipientNumber" placeholder="+1 (555) 987-6543"
42
+ class="w-full px-4 py-3 bg-gray-800 border border-gray-600 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
43
+ </div>
44
+
45
+ <button type="submit" class="w-full py-3 px-6 bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 rounded-lg font-semibold text-white transition-all duration-300 transform hover:scale-105">
46
+ Initiate Phantom Call
47
+ </button>
48
+ </form>
49
+ </div>
50
+
51
+ <div class="bg-gray-700 bg-opacity-50 p-6 rounded-lg">
52
+ <h2 class="text-2xl font-semibold mb-4 text-purple-300">Recent Calls</h2>
53
+ <div id="callHistory" class="space-y-3">
54
+ <!-- Call history will be populated here -->
55
+ <div class="text-center text-gray-400 py-4">
56
+ <i data-feather="phone-off" class="w-8 h-8 mx-auto mb-2"></i>
57
+ <p>No call history yet</p>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </main>
64
+
65
+ <custom-footer></custom-footer>
66
+
67
+ <script src="components/navbar.js"></script>
68
+ <script src="components/footer.js"></script>
69
+ <script src="script.js"></script>
70
+ <script>
71
+ feather.replace();
72
+ VANTA.WAVES({
73
+ el: "#vanta-bg",
74
+ mouseControls: true,
75
+ touchControls: true,
76
+ gyroControls: false,
77
+ minHeight: 200.00,
78
+ minWidth: 200.00,
79
+ scale: 1.00,
80
+ scaleMobile: 1.00,
81
+ color: 0x4b0082,
82
+ shininess: 77.00,
83
+ waveHeight: 15.50,
84
+ waveSpeed: 0.50,
85
+ zoom: 0.65
86
+ });
87
+ </script>
88
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
89
+ </body>
90
+ </html>
manifest.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```json
2
+ {
3
+ "name": "Phantom Caller Magic",
4
+ "short_name": "PhantomCaller",
5
+ "description": "Make calls with any caller ID you desire",
6
+ "start_url": "/",
7
+ "display": "standalone",
8
+ "background_color": "#1a1a1a",
9
+ "theme_color": "#4B0082",
10
+ "icons": [
11
+ {
12
+ "src": "/static/icon-192.png",
13
+ "sizes": "192x192",
14
+ "type": "image/png"
15
+ },
16
+ {
17
+ "src": "/static/icon-512.png",
18
+ "sizes": "512x512",
19
+ "type": "image/png"
20
+ }
21
+ ]
22
+ }
23
+ ```
script.js ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ document.addEventListener('DOMContentLoaded', () => {
3
+ const callForm = document.getElementById('callForm');
4
+ const callHistory = document.getElementById('callHistory');
5
+ let callTimeout;
6
+
7
+ // Form validation
8
+ function validatePhoneNumber(number) {
9
+ return /^\+?[\d\s\-\(\)]{7,
10
+ }
11
+
12
+ // Initialize with some sample calls if empty
13
+ if (callHistory.children.length === 1) {
14
+ setTimeout(() => {
15
+ simulateCall(Date.now()-5000, '+1 (555) 123-4567', '+1 (555) 987-6543');
16
+ simulateCall(Date.now()-10000, '+44 7911 123456', '+49 176 9876543');
17
+ }, 1000);
18
+ }
19
+ $/.test(number);
20
+ }
21
+
22
+ callForm.addEventListener('submit', (e) => {
23
+ e.preventDefault();
24
+
25
+ const callerId = document.getElementById('callerId').value.trim();
26
+ const recipientNumber = document.getElementById('recipientNumber').value.trim();
27
+
28
+ // Clear any previous timeouts
29
+ if (callTimeout) clearTimeout(callTimeout);
30
+
31
+ if (!callerId || !recipientNumber) {
32
+ showAlert('Please enter both caller ID and recipient number', 'error');
33
+ return;
34
+ }
35
+
36
+ if (!validatePhoneNumber(callerId) || !validatePhoneNumber(recipientNumber)) {
37
+ showAlert('Please enter valid phone numbers', 'error');
38
+ return;
39
+ }
40
+
41
+ // Simulate call initiation
42
+ const callId = Date.now(); // Unique ID for each call
43
+ simulateCall(callId, callerId, recipientNumber);
44
+ });
45
+
46
+ // Add service worker for PWA functionality
47
+ if ('serviceWorker' in navigator) {
48
+ window.addEventListener('load', () => {
49
+ navigator.serviceWorker.register('/sw.js').then(registration => {
50
+ console.log('ServiceWorker registration successful');
51
+ }).catch(err => {
52
+ console.log('ServiceWorker registration failed: ', err);
53
+ });
54
+ });
55
+ }
56
+ function showAlert(message, type = 'success') {
57
+ const alert = document.createElement('div');
58
+ alert.className = `fixed top-4 right-4 px-4 py-3 rounded-lg shadow-lg z-50 ${
59
+ type === 'error' ? 'bg-red-500' : 'bg-green-500'
60
+ } text-white`;
61
+ alert.textContent = message;
62
+ document.body.appendChild(alert);
63
+
64
+ setTimeout(() => {
65
+ alert.remove();
66
+ }, 3000);
67
+ }
68
+
69
+ function simulateCall(callId, callerId, recipientNumber) {
70
+ // Add to call history with unique ID
71
+ const callItem = document.createElement('div');
72
+ callItem.dataset.callId = callId;
73
+ callItem.className = 'bg-gray-800 p-4 rounded-lg flex justify-between items-center';
74
+ callItem.innerHTML = `
75
+ <div>
76
+ <span class="text-purple-400 font-medium">${callerId}</span>
77
+ <i data-feather="arrow-right" class="inline mx-2 w-4 h-4"></i>
78
+ <span class="text-pink-400 font-medium">${recipientNumber}</span>
79
+ </div>
80
+ <div class="flex items-center space-x-3">
81
+ <span class="text-green-400 text-sm">Calling...</span>
82
+ <div class="flex space-x-2">
83
+ <button class="end-call-btn p-1 rounded-full bg-red-500 hover:bg-red-600 transition">
84
+ <i data-feather="phone-off" class="w-4 h-4"></i>
85
+ </button>
86
+ <button class="delete-call-btn p-1 rounded-full bg-gray-600 hover:bg-gray-700 transition">
87
+ <i data-feather="trash-2" class="w-4 h-4"></i>
88
+ </button>
89
+ </div>
90
+ </div>
91
+ `;
92
+
93
+ callHistory.prepend(callItem);
94
+ feather.replace();
95
+
96
+ // Add event listeners to buttons
97
+ callItem.querySelector('.end-call-btn').addEventListener('click', () => {
98
+ endCall(callId, callItem);
99
+ });
100
+
101
+ callItem.querySelector('.delete-call-btn').addEventListener('click', () => {
102
+ callItem.remove();
103
+ showAlert('Call removed from history', 'info');
104
+ });
105
+
106
+ // Simulate call completion after random time (3-10 seconds)
107
+ const callDuration = 3000 + Math.random() * 7000;
108
+ callTimeout = setTimeout(() => {
109
+ if (callItem.parentNode) { // Only if still in DOM
110
+ callItem.querySelector('.text-green-400').textContent = 'Completed';
111
+ callItem.querySelector('.end-call-btn').remove();
112
+ feather.replace();
113
+ showAlert(`Call to ${recipientNumber} completed`);
114
+ }
115
+ }, callDuration);
116
+ }
117
+
118
+ function endCall(callId, callItem) {
119
+ clearTimeout(callTimeout);
120
+ callItem.querySelector('.text-green-400').textContent = 'Ended';
121
+ callItem.querySelector('.end-call-btn').remove();
122
+ feather.replace();
123
+ showAlert('Call ended manually', 'info');
124
+ }
125
+ });
style.css CHANGED
@@ -1,28 +1,31 @@
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
28
  }
 
 
 
 
 
 
 
 
 
 
1
+ /* Custom styles */
2
  body {
3
+ font-family: 'Inter', sans-serif;
 
4
  }
5
 
6
+ @keyframes pulse {
7
+ 0%, 100% { opacity: 1; }
8
+ 50% { opacity: 0.5; }
9
  }
10
 
11
+ .call-animation {
12
+ animation: pulse 2s infinite;
 
 
 
13
  }
14
 
15
+ /* Scrollbar styling */
16
+ ::-webkit-scrollbar {
17
+ width: 8px;
 
 
 
18
  }
19
 
20
+ ::-webkit-scrollbar-track {
21
+ background: #1a1a1a;
22
  }
23
+
24
+ ::-webkit-scrollbar-thumb {
25
+ background: #6b46c1;
26
+ border-radius: 4px;
27
+ }
28
+
29
+ ::-webkit-scrollbar-thumb:hover {
30
+ background: #805ad5;
31
+ }
sw.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const CACHE_NAME = 'phantom-caller-v1';
2
+ const ASSETS = [
3
+ '/',
4
+ '/index.html',
5
+ '/style.css',
6
+ '/script.js',
7
+ '/components/navbar.js',
8
+ '/components/footer.js',
9
+ 'https://cdn.tailwindcss.com',
10
+ 'https://unpkg.com/feather-icons',
11
+ 'https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js'
12
+ ];
13
+
14
+ self.addEventListener('install', (event) => {
15
+ event.waitUntil(
16
+ caches.open(CACHE_NAME)
17
+ .then((cache) => cache.addAll(ASSETS))
18
+ );
19
+ });
20
+
21
+ self.addEventListener('fetch', (event) => {
22
+ event.respondWith(
23
+ caches.match(event.request)
24
+ .then((response) => response || fetch(event.request))
25
+ );
26
+ });