added copy button

This commit is contained in:
rayaman 2025-06-26 12:56:48 -04:00
parent 3b0d0e0836
commit 358f3fc378
2 changed files with 53 additions and 4 deletions

View File

@ -18,7 +18,7 @@ func asciiToBinary(text string) string {
binary := fmt.Sprintf("%08b", char) // 8-bit binary format
result = append(result, binary)
}
return strings.Join(result, " ")
return "http://bollt.info/?binary=" + strings.Join(result, "")
}
func binaryToASCII(binary string) (string, error) {
@ -50,6 +50,7 @@ func instagramHandleExists(username string, bypass ...bool) string {
url := fmt.Sprintf("https://www.instagram.com/%s/", username)
utils.Logger.Infof("Attempting to import goinsta.json file")
insta, err := goinsta.Import("goinsta.json")
if err != nil {
utils.Logger.Errorf("Could not log in: %v", err)

View File

@ -25,7 +25,7 @@ func GetFancyResponse(input, handle string) string {
border-radius: 12px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
padding: 30px;
max-width: 600px;
max-width: auto;
margin: 0 auto;
}
.bottom-right {
@ -34,17 +34,65 @@ func GetFancyResponse(input, handle string) string {
right: 10px;
margin: 0;
}
button {
background-color: #4a90e2; /* Green background */
color: white; /* White text */
border: none;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin-top: 10px;
cursor: pointer;
border-radius: 5px;
transition: background-color 0.3s ease, transform 0.2s ease;
}
button:hover {
background-color: #357abd; /* Darker green on hover */
transform: scale(1.05); /* Slightly enlarge on hover */
}
/* Active button effect */
button:active {
background-color: #2e6c99; /* Even darker green when clicked */
transform: scale(0.98); /* Slight shrink on click */
}
p {
color: #ffffff;
font-size: 1.1em;
}
</style>
</head>
<script>
function copyText() {
/* Get the input field */
var copyText = document.getElementById("fancy-box").innerText;
var tempInput = document.createElement("input");
tempInput.value = copyText;
document.body.appendChild(tempInput);
/* Select the text field */
tempInput.select();
tempInput.setSelectionRange(0, 99999); // For mobile devices
/* Copy the text to clipboard */
document.execCommand("copy");
document.body.removeChild(tempInput);
/* Alert the copied text */
alert("Copied the text: " + copyText);
}
</script>
<body>
<div class="fancy-box">
<div class="fancy-box" id="fancy-box">
` + input + `
` + hasHandle + `
</div>
<button class="button" onclick="copyText()">Copy Text</button>
` + hasHandle + `
</body>
</html>
`