-1

Can someone tell how to make a Violentmonkey/Greasemonkey compatible script, that adds a box to a webpage, that has a text and a clickable link inside?

Example case to work with:

How to make a box to the upperleft corner of Stackoverflow, that has "Google" as visible text and when you click it, you'll be redirected to https://www.google.com.

Sample picture of what I have in mind

I want to be able to generate boxes on websites that I can use to click myself into a different webpage (or open it in a new tab). The whole box should be clickable.

Colors don't need to match the reference picture - I'll edit the style properties.

I searched Google some time already and found various codes but nothing worked for me in generating a box with a clickable link.

  • something like `x=document.createElement("a");x.innerText="go to google";x.style='border:2px solid black;background: yellow;display:inline-block;position:fixed;top:20px;left:50px;color:black;padding:5px 10px;';x.href="...";document.body.appendChild(x)`? – corn on the cob Aug 28 '23 at 17:08
  • Yes, that's what I was looking for. Thanks! – Jan Kee Aug 28 '23 at 19:24
  • Please provide enough code so others can better understand or reproduce the problem. – Community Aug 29 '23 at 07:19

0 Answers0