added copy button
This commit is contained in:
parent
3b0d0e0836
commit
358f3fc378
@ -18,7 +18,7 @@ func asciiToBinary(text string) string {
|
|||||||
binary := fmt.Sprintf("%08b", char) // 8-bit binary format
|
binary := fmt.Sprintf("%08b", char) // 8-bit binary format
|
||||||
result = append(result, binary)
|
result = append(result, binary)
|
||||||
}
|
}
|
||||||
return strings.Join(result, " ")
|
return "http://bollt.info/?binary=" + strings.Join(result, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
func binaryToASCII(binary string) (string, error) {
|
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)
|
url := fmt.Sprintf("https://www.instagram.com/%s/", username)
|
||||||
|
|
||||||
utils.Logger.Infof("Attempting to import goinsta.json file")
|
utils.Logger.Infof("Attempting to import goinsta.json file")
|
||||||
|
|
||||||
insta, err := goinsta.Import("goinsta.json")
|
insta, err := goinsta.Import("goinsta.json")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Errorf("Could not log in: %v", err)
|
utils.Logger.Errorf("Could not log in: %v", err)
|
||||||
|
|||||||
@ -25,7 +25,7 @@ func GetFancyResponse(input, handle string) string {
|
|||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
max-width: 600px;
|
max-width: auto;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.bottom-right {
|
.bottom-right {
|
||||||
@ -34,17 +34,65 @@ func GetFancyResponse(input, handle string) string {
|
|||||||
right: 10px;
|
right: 10px;
|
||||||
margin: 0;
|
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 {
|
p {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</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>
|
<body>
|
||||||
<div class="fancy-box">
|
<div class="fancy-box" id="fancy-box">
|
||||||
` + input + `
|
` + input + `
|
||||||
` + hasHandle + `
|
|
||||||
</div>
|
</div>
|
||||||
|
<button class="button" onclick="copyText()">Copy Text</button>
|
||||||
|
` + hasHandle + `
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
`
|
`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user