Javascript : Put image into Chrome browser's console
Problem:
You want to have some fun with the software testing department or anyone that will use Chrome's console to inspect the stuff behind your web page. How to include image or meme in your web page?
Solution:
Use https://github.com/adriancooney/console.image - "The one thing Chrome Dev Tools didn't need." to include meme or image into the console.
Below code example is a simple Golang web server that will show a Gopher image in Chrome's console. It uses base64 encoding for the image. You can use URL to your images as well. Such as:
console.image("http://i.imgur.com/hv6pwkb.png");
NOTE: Use https://www.base64-image.de/ to convert images to base64 encoded string.
Check out https://github.com/adriancooney/console.image to see other configuration methods.
Here you go!
package main
import (
"net/http"
)
func Home(w http.ResponseWriter, r *http.Request) {
html := `<html>
<!-- Or use a CDN -->
<script src="https://cdn.rawgit.com/adriancooney/console.image/c9e6d4fd/console.image.min.js"></script>
I've a secret message for you. See your browser's console.</html>
<script>
console.image("data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCACSAL4DAREAAhEBAxEB/8QAtgAAAQQDAQAAAAAAAAAAAAAAAAQFBgcCAwgBAQEAAgMBAQAAAAAAAAAAAAAAAgMBBAUGBxAAAgECBAMGAgYGBAwHAAAAAQIDEQQAIRIFMRMGQVFhIjIHIzNxgUJSYhSRoUM0FQjB4XI18LGCkqJTY3OjJBY38YOzRHQ2FxEAAgEDAwIEBAQEBAYDAAAAAAECEQMEITESQQVRYSITcYEyBvCRocGx0UIU4XKCM/FSsiMkFTQ1Fv/aAAwDAQACEQMRAD8A6pwAYAMAGADABgAwAYAMAGAEO875s+ybfLuW73sNhYwislzcOsaDwq3aewYAr68/mO9qI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GxqtTR9D6UMYLTxSpRGzEbsCdNKU9K9vgMZi18jFT1IUCSTKrNqfS+paRrIHAquo1PkpmrcezEXJGeIN/dTej03H9j1Nx/F9/8WrBfsRkK5/W3+5f1fN+16Pw/e8MY6lqDZP2fzuEHzfR8lvmf7T734cT8PiVoSv8A3gfn+qH5vy/RH6fH734sSHieL+/v6eP2f3j5Mv8Aw+7/ACcRYFG4fu9x8z5tv8v+3/h/5mML6UYW5sv/AJEX0vw+j9r4/d/DiUtzMdhKfkr8n0t8/hwX/h/fwWxiXQuP2p/+vy+n5q8PX8pPV493hTGwtjXu7k0k+U/9k4mVmr/2J9Xob0ergfT/AEYdR1K09zv+xW9/N/dl/cvmfOj/AFf6zwrjEy61/uL4lI+zn/cfo35vpm/d+PypPV+D7+NDF+uR6jv/AP8AGt/hHVG68JOPrXhx4r6fHHQieUQ4L65OHA4GGaLj1/V2ceHZgSKAh/dbv/5D+v5fq+z/ALX/AFf4dONKe6NhCQ/LtfR6l9X7v6x/o9/4sFs/2+BJiXqv+4r/APdvnX395fK9P7X/AGf3frxK2RmV57efIj/uvs+Z8r1r/p/d8MWS2IQ3LEH94w/N/afL9XFuHh3eOKi0dNo9F36/TL835/1+HfjM92YQnvP3o/M+U/D/AHS+j/D04h4DqJh8/wDa/unZx4j9X9NMIfTImz//2Q==")
</script>`
w.Write([]byte(html))
}
func main() {
http.HandleFunc("/", Home)
http.ListenAndServe(":8080", nil)
}
Happy coding!
See also : Golang : Inject/embed Javascript before sending out to browser example
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+6k Golang : Get missing location after unmarshal binary and gob decode time.
+7.5k Golang : Test if an input is an Armstrong number example
+36.5k Golang : Converting a negative number to positive number
+9.6k Golang : ffmpeg with os/exec.Command() returns non-zero status
+9.4k Javascript : Read/parse JSON data from HTTP response
+9.5k Golang : Detect number of active displays and the display's resolution
+18.3k Golang : Write file with io.WriteString
+7.8k Golang : Handle Palindrome string with case sensitivity and unicode
+9k Golang : does not implement flag.Value (missing Set method)
+17.6k Golang : Login and logout a user after password verification and redirect example
+8.8k Golang : Build and compile multiple source files
+10.6k PHP : Convert(cast) bigInt to string