0% found this document useful (0 votes)
4K views2 pages

Parar Roleta

The document programmatically creates elements to display a context menu for a bot. It creates a <script> element containing functions for stopping a roulette slider, viewing results, and closing the menu. It also creates <style> and <div> elements to define the menu's styling and content. Event listeners are added to display the menu on right click or double click depending on screen width.

Uploaded by

Márcia Antonio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4K views2 pages

Parar Roleta

The document programmatically creates elements to display a context menu for a bot. It creates a <script> element containing functions for stopping a roulette slider, viewing results, and closing the menu. It also creates <style> and <div> elements to define the menu's styling and content. Event listeners are added to display the menu on right click or double click depending on screen width.

Uploaded by

Márcia Antonio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

const script = document.

createElement('script');
script.innerText = "function stopScroll() { let roulette_slider_entries =
document.getElementById('roulette-slider-entries'); let roulette_slider_pixels =
get_str(roulette_slider_entries.getAttribute('style'), 'translateX(', ')');
roulette_slider_entries.removeAttribute('style');
roulette_slider_entries.setAttribute('style', `transform: translateX($
{roulette_slider_pixels}); transition-duration: 0ms; transition-delay: 0ms;`); }
function seeResult() { let roulette_slider_entries =
document.getElementById('roulette-slider-entries');
roulette_slider_entries.removeAttribute('style'); let randValue =
Math.floor(Math.random() * -6999.9) + 'px';
roulette_slider_entries.setAttribute('style', `transform: translateX(${randValue});
transition-duration: 0ms; transition-delay: 0ms;`); } function get_str(string,
start, end) { str = string.split(start); str = str[1].split(end); return str[0]; }
function closeMenu() { let context_options =
document.getElementsByClassName('context-options')[0];
context_options.style.display = 'none'; }";

const styleTag = document.createElement('style');


styleTag.innerHTML = "@import url('https://fonts.googleapis.com/css2?
family=M+PLUS+1+Code&display=swap'); div.context-options { position: fixed; top:
50px; bottom: 0; left: 50px; right: 0; width: 250px; height: max-content; border:
2px solid red; background: #4c0f0f; padding: 10px; display: none; z-index: 9999; }
div.context-options img { position: absolute; width: 60px; top: -35px; left: -30px;
transform: rotate(328deg); } div.context-options span.bot-title { color: red; text-
align: center; display: block; font-family: 'M PLUS 1 Code', sans-serif; margin-
bottom: 5px; } div.context-options span.context-option { text-align: left; display:
block; width: 100%; box-sizing: border-box; background: #000; color: #fff; padding:
10px; border-bottom: 1px solid red; cursor: pointer; font-weight: bold; font-size:
12px; font-family: 'M PLUS 1 Code', sans-serif; transition: .1s all; } div.context-
options span.context-option:hover { transform: scale(1.1); } div.context-options
span.context-option:active { transform: scale(1); } .closeContextOptions
{ background: #9e0000 !important; } span.dev-by { color: red; display: block; text-
align: center; margin-top: 5px; font-family: 'M PLUS 1 Code', sans-serif; }";

const menuDiv = document.createElement('div');


menuDiv.classList.add('context-options');
menuDiv.innerHTML = `
<img src="https://i.ibb.co/PwfqPNv/image-removebg-preview.png" />
<span class="bot-title"><i class="fas fa-robot"></i>&nbsp;Bot Million |
(v5.0)</span>
<span class="context-option closeContextOptions" onclick="closeMenu();"><i
class="fas fa-times"></i>&nbsp;Fechar Menu</span>
<span class="context-option" onclick="stopScroll();"><i class="fas
fa-stop"></i>&nbsp;Parar Roleta (double game)</span>
<span class="context-option" onclick="seeResult();"><i class="fas
fa-eye"></i>&nbsp;Ver Resultado (antes de rodar)</span>
<span class="dev-by"><i class="fas fa-code"></i>&nbsp;Feito por: Allan
Santos</span>
`;

let fafa = document.createElement('script');


fafa.src = 'https://kit.fontawesome.com/a076d05399.js';
fafa.setAttribute('crossorigin', 'anonymous');
document.body.prepend(fafa);
document.body.prepend(styleTag);
document.body.appendChild(menuDiv);
document.body.appendChild(script);
if (window.matchMedia("(max-width: 800px)").matches) {
document.addEventListener('dblclick', function(event) {
event.preventDefault();

let posX = event.clientX;


let posY = event.clientY;
let context_options = document.getElementsByClassName('context-options')[0];

context_options.style.top = `${posY}px`;
context_options.style.left = `${posX}px`;
context_options.style.display = 'unset';
});
} else {
document.addEventListener('contextmenu', function(event) {
event.preventDefault();

let posX = event.clientX;


let posY = event.clientY;
let context_options = document.getElementsByClassName('context-options')[0];

context_options.style.top = `${posY}px`;
context_options.style.left = `${posX}px`;
context_options.style.display = 'unset';
});
}

You might also like