Skip to content

Commit 2012fb8

Browse files
committed
remove: sistema de monitoramento das paginas
1 parent 9565a7c commit 2012fb8

3 files changed

Lines changed: 50 additions & 263 deletions

File tree

ScriptsCard/RedPR.html

Lines changed: 50 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -300,157 +300,63 @@ <h2 class="step-title">Tá pronto! Agora é só usar! 🚀</h2>
300300

301301
</div><!-- /container -->
302302

303-
<script>
304-
function getDevice() {
305-
const w = window.innerWidth;
306-
if (w < 600) return 'mobile';
307-
if (w < 1024) return 'tablet';
308-
return 'desktop';
309-
}
310-
311-
function setupPage() {
312-
const device = getDevice();
313-
const video = document.getElementById('tutorialVideo');
314-
const badge = document.getElementById('deviceBadge');
315-
const caption = document.getElementById('videoCaption');
316-
const vc = document.getElementById('videoContainer');
317-
318-
const config = {
319-
mobile: {label: '📱 Tutorial para Celular', cap: 'Vídeo com instruções para celular', ratio: '9/16' },
320-
tablet: {label: '📱 Tutorial para Tablet', cap: 'Vídeo com instruções para tablet', ratio: '4/3' },
321-
desktop: {label: '🖥️ Tutorial para Computador', cap: 'Vídeo com instruções para computador', ratio: '16/9' }
322-
};
323-
324-
const c = config[device];
325-
badge.textContent = c.label;
326-
327-
const source = document.createElement('source');
328-
source.src = c.src;
329-
source.type = 'video/mp4';
330-
}
331-
332-
function showToast() {
333-
const toast = document.getElementById('toast');
334-
toast.classList.add('show');
335-
setTimeout(() => toast.classList.remove('show'), 3000);
336-
}
337-
338-
function copyFunc() {
339-
const text = document.getElementById('scriptCode').innerText;
340-
if (navigator.clipboard && navigator.clipboard.writeText) {
341-
navigator.clipboard.writeText(text).then(showToast).catch(fallbackCopy);
342-
} else {
343-
fallbackCopy();
344-
}
345-
function fallbackCopy() {
346-
const el = document.createElement('textarea');
347-
el.value = text;
348-
el.style.position = 'fixed';
349-
el.style.opacity = '0';
350-
document.body.appendChild(el);
351-
el.focus();
352-
el.select();
353-
document.execCommand('copy');
354-
document.body.removeChild(el);
355-
showToast();
356-
}
357-
}
358-
359-
setupPage();
360-
</script>
361303
<script>
362-
if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1')
363-
{
364-
const devModeAlert = document.createElement('div');
365-
366-
devModeAlert.style.position = 'fixed';
367-
devModeAlert.style.left = '92%';
368-
devModeAlert.style.top = '10%';
369-
devModeAlert.style.transform = 'translate(-50%, -50%)';
370-
devModeAlert.style.zIndex = '10000';
371-
372-
devModeAlert.style.width = '150px';
373-
devModeAlert.style.height = '45px';
374-
devModeAlert.style.boxSizing = 'border-box';
375-
376-
devModeAlert.style.backgroundColor = 'black';
377-
devModeAlert.style.borderRadius = '25px';
378-
devModeAlert.style.border = '2px solid rgb(0,215,0)';
379-
380-
devModeAlert.textContent = 'DEV MODE';
381-
devModeAlert.style.fontFamily = 'monospace';
382-
devModeAlert.style.fontSize = '24px';
383-
devModeAlert.style.fontWeight = 'bold';
384-
devModeAlert.style.color = 'rgb(0,215,0)';
385-
386-
devModeAlert.style.display = 'flex';
387-
devModeAlert.style.alignItems = 'center';
388-
devModeAlert.style.justifyContent = 'center';
389-
390-
document.body.appendChild(devModeAlert);
304+
function getDevice() {
305+
const w = window.innerWidth;
306+
if (w < 600) return 'mobile';
307+
if (w < 1024) return 'tablet';
308+
return 'desktop';
391309
}
392-
else
393-
{
394-
const socialBarScript = document.createElement('script')
395-
socialBarScript.src = "https://socialbar.greenscriptshub.workers.dev/69/48/71/694871912c33e6042fa1c2eb0b8d6988.js"
396310

397-
document.body.appendChild(socialBarScript);
311+
function setupPage() {
312+
const device = getDevice();
313+
const video = document.getElementById('tutorialVideo');
314+
const badge = document.getElementById('deviceBadge');
315+
const caption = document.getElementById('videoCaption');
316+
const vc = document.getElementById('videoContainer');
317+
318+
const config = {
319+
mobile: {label: '📱 Tutorial para Celular', cap: 'Vídeo com instruções para celular', ratio: '9/16' },
320+
tablet: {label: '📱 Tutorial para Tablet', cap: 'Vídeo com instruções para tablet', ratio: '4/3' },
321+
desktop: {label: '🖥️ Tutorial para Computador', cap: 'Vídeo com instruções para computador', ratio: '16/9' }
322+
};
323+
324+
const c = config[device];
325+
badge.textContent = c.label;
326+
327+
const source = document.createElement('source');
328+
source.src = c.src;
329+
source.type = 'video/mp4';
398330
}
399-
</script>
400-
401-
402-
<script type="module">
403-
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2'
404-
405-
const supabase = createClient('https://btdbraicotnkhfkexwyh.supabase.co', "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ0ZGJyYWljb3Rua2hma2V4d3loIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc1MDY2MjcsImV4cCI6MjA5MzA4MjYyN30.ftV4X0vN3NRHJhsIyI_z4D0rm8sGPxVtwzhOux1jykA")
406-
const canal = supabase.channel('analytics')
407-
408-
const join_in = new Date().toISOString()
409-
const page = "RedPR"
410-
const admCookie = document.cookie.match('(^|;)\\s*admin\\s*=\\s*([^;]+)')?.[2] || null;
411-
const URL = 'https://btdbraicotnkhfkexwyh.supabase.co/functions/v1/PageTime'
412-
const anomKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ0ZGJyYWljb3Rua2hma2V4d3loIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc1MDY2MjcsImV4cCI6MjA5MzA4MjYyN30.ftV4X0vN3NRHJhsIyI_z4D0rm8sGPxVtwzhOux1jykA'
413331

414-
let enviado = false
415-
416-
function enviarDados(arrive_in, leave_in, session_time_sec) {
417-
if (enviado) return
418-
enviado = true
419-
420-
fetch(URL, {
421-
method: 'POST',
422-
headers: {
423-
'Authorization': `Bearer ${anomKey}`,
424-
'Content-Type': 'application/json'
425-
},
426-
body: JSON.stringify({ page, arrive_in, leave_in, session_time_sec, admCookie }),
427-
keepalive: true
428-
})
429-
}
430-
431-
canal.on('presence', { event: 'sync' }, () => {})
432-
.subscribe(async (status) => {
433-
if (status === 'SUBSCRIBED') {
434-
await canal.track({ page, join_in })
435-
}
436-
})
437-
438-
window.addEventListener('beforeunload', () => {
439-
const leave_in = new Date().toISOString()
440-
const session_time_sec = Math.floor(
441-
(new Date(leave_in) - new Date(join_in)) / 1000
442-
)
443-
if (admCookie === null)
444-
{
445-
enviarDados(join_in, leave_in, session_time_sec)
332+
function showToast() {
333+
const toast = document.getElementById('toast');
334+
toast.classList.add('show');
335+
setTimeout(() => toast.classList.remove('show'), 3000);
446336
}
447-
else
448-
{
449-
console.log("nao me hackeia por favor 😭)")
450-
}
451-
})
452-
</script>
453337

338+
function copyFunc() {
339+
const text = document.getElementById('scriptCode').innerText;
340+
if (navigator.clipboard && navigator.clipboard.writeText) {
341+
navigator.clipboard.writeText(text).then(showToast).catch(fallbackCopy);
342+
} else {
343+
fallbackCopy();
344+
}
345+
function fallbackCopy() {
346+
const el = document.createElement('textarea');
347+
el.value = text;
348+
el.style.position = 'fixed';
349+
el.style.opacity = '0';
350+
document.body.appendChild(el);
351+
el.focus();
352+
el.select();
353+
document.execCommand('copy');
354+
document.body.removeChild(el);
355+
showToast();
356+
}
357+
}
454358

359+
setupPage();
360+
</script>
455361
</body>
456362
</html>

index.html

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -159,79 +159,6 @@ <h2 class="atitle" id="sobre-titulo">O que é o GreenScripts HUB?</h2>
159159

160160
<!-- FOOTER -->
161161
<footer class="foot">© 2026 GreenScripts HUB · Feito para estudantes do Paraná</footer>
162-
163162
</div>
164-
165-
<script>
166-
const keysDiv = document.getElementById('keys')
167-
getNumOfKeys();
168-
169-
async function getNumOfKeys() {
170-
const URL = 'https://btdbraicotnkhfkexwyh.supabase.co/functions/v1/ReturnGenerateKeys'
171-
const anomKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ0ZGJyYWljb3Rua2hma2V4d3loIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc1MDY2MjcsImV4cCI6MjA5MzA4MjYyN30.ftV4X0vN3NRHJhsIyI_z4D0rm8sGPxVtwzhOux1jykA'
172-
173-
const response = await fetch(URL,
174-
{method: 'GET',
175-
headers: {'Authorization': `Bearer ${anomKey}`, 'Content-Type': 'application/json'}}
176-
)
177-
178-
if(!response.ok)
179-
{
180-
keysDiv.innerText = '173'
181-
}
182-
183-
const data = await response.json()
184-
keysDiv.innerText = data.totalKeys
185-
}
186-
187-
</script>
188-
189-
190-
<script type="module">
191-
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2'
192-
193-
const supabase = createClient('https://btdbraicotnkhfkexwyh.supabase.co', "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ0ZGJyYWljb3Rua2hma2V4d3loIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc1MDY2MjcsImV4cCI6MjA5MzA4MjYyN30.ftV4X0vN3NRHJhsIyI_z4D0rm8sGPxVtwzhOux1jykA")
194-
const canal = supabase.channel('analytics')
195-
196-
const join_in = new Date().toISOString()
197-
const page = "home"
198-
const admCookie = document.cookie.match('(^|;)\\s*admin\\s*=\\s*([^;]+)')?.[2] || null;
199-
const URL = 'https://btdbraicotnkhfkexwyh.supabase.co/functions/v1/PageTime'
200-
const anomKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ0ZGJyYWljb3Rua2hma2V4d3loIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc1MDY2MjcsImV4cCI6MjA5MzA4MjYyN30.ftV4X0vN3NRHJhsIyI_z4D0rm8sGPxVtwzhOux1jykA'
201-
202-
let enviado = false
203-
204-
function enviarDados(arrive_in, leave_in, session_time_sec) {
205-
if (enviado) return
206-
enviado = true
207-
fetch(URL, {
208-
method: 'POST',
209-
headers: {
210-
'Authorization': `Bearer ${anomKey}`,
211-
'Content-Type': 'application/json'
212-
},
213-
body: JSON.stringify({ page, arrive_in, leave_in, session_time_sec, admCookie }),
214-
keepalive: true
215-
})
216-
}
217-
218-
canal.on('presence', { event: 'sync' }, () => {})
219-
.subscribe(async (status) => {
220-
if (status === 'SUBSCRIBED') {
221-
await canal.track({ page, join_in })
222-
}
223-
})
224-
225-
window.addEventListener('beforeunload', () => {
226-
const leave_in = new Date().toISOString()
227-
const session_time_sec = Math.floor((new Date(leave_in) - new Date(join_in)) / 1000)
228-
if (admCookie === null) {
229-
enviarDados(join_in, leave_in, session_time_sec)
230-
} else {
231-
console.log("nao me hackeia por favor 😭)")
232-
}
233-
})
234-
</script>
235-
236163
</body>
237164
</html>

scripts.html

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -74,51 +74,5 @@ <h3 class="script-card-title">Redação Paraná</h3>
7474
</div>
7575
</div>
7676

77-
<script type="module">
78-
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2'
79-
80-
const supabase = createClient('https://btdbraicotnkhfkexwyh.supabase.co', "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ0ZGJyYWljb3Rua2hma2V4d3loIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc1MDY2MjcsImV4cCI6MjA5MzA4MjYyN30.ftV4X0vN3NRHJhsIyI_z4D0rm8sGPxVtwzhOux1jykA")
81-
const canal = supabase.channel('analytics')
82-
83-
const join_in = new Date().toISOString()
84-
const page = "scripts"
85-
const admCookie = document.cookie.match('(^|;)\\s*admin\\s*=\\s*([^;]+)')?.[2] || null;
86-
const URL = 'https://btdbraicotnkhfkexwyh.supabase.co/functions/v1/PageTime'
87-
const anomKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ0ZGJyYWljb3Rua2hma2V4d3loIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc1MDY2MjcsImV4cCI6MjA5MzA4MjYyN30.ftV4X0vN3NRHJhsIyI_z4D0rm8sGPxVtwzhOux1jykA'
88-
89-
let enviado = false
90-
91-
function enviarDados(arrive_in, leave_in, session_time_sec) {
92-
if (enviado) return
93-
enviado = true
94-
fetch(URL, {
95-
method: 'POST',
96-
headers: {
97-
'Authorization': `Bearer ${anomKey}`,
98-
'Content-Type': 'application/json'
99-
},
100-
body: JSON.stringify({ page, arrive_in, leave_in, session_time_sec, admCookie }),
101-
keepalive: true
102-
})
103-
}
104-
105-
canal.on('presence', { event: 'sync' }, () => {})
106-
.subscribe(async (status) => {
107-
if (status === 'SUBSCRIBED') {
108-
await canal.track({ page, join_in })
109-
}
110-
})
111-
112-
window.addEventListener('beforeunload', () => {
113-
const leave_in = new Date().toISOString()
114-
const session_time_sec = Math.floor((new Date(leave_in) - new Date(join_in)) / 1000)
115-
if (admCookie === null) {
116-
enviarDados(join_in, leave_in, session_time_sec)
117-
} else {
118-
console.log("nao me hackeia por favor 😭)")
119-
}
120-
})
121-
</script>
122-
12377
</body>
12478
</html>

0 commit comments

Comments
 (0)