Created
April 10, 2023 03:52
-
-
Save rynomad/4a0db50c136079f2adfb119fd3104be7 to your computer and use it in GitHub Desktop.
smiley
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Smiley Face Button | |
// @namespace Violentmonkey Scripts | |
// @version 1 | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Create the smiley face button element | |
var smileyButton = document.createElement('button'); | |
smileyButton.style.position = 'fixed'; | |
smileyButton.style.top = '10px'; | |
smileyButton.style.right = '10px'; | |
smileyButton.style.fontSize = '60px'; | |
smileyButton.innerHTML = '😀'; | |
// Add a click event listener to the smiley face button | |
smileyButton.addEventListener('click', function() { | |
alert('tee-hee'); | |
}); | |
// Append the smiley face button element to the body | |
document.body.appendChild(smileyButton); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment