Search code examples
tampermonkey

TamperMonkey: Getting Rid Of The "//" When Pasting A Link (it turns into gray text when it detects "//")


How Do I Remove This Link Turning Into A Gray Text That Makes Pasting Links Useless? Does It Affect My Goals Of Using Link In My Script? (making the background an image URL) And If So, How Would I Fix This? ALSO I Am Trying To Paste A Link That Changes Background URL So It Has Correlation With CSS But Idk If The Gray Text Messes With My Script Or Not :')

So Far, I Have Tried Nothing Because I'm Pretty New To Scripting But I've Been Working On Moving DVD Logo That Bounces Off Webpages Border/All Sides Of WebPage (i know its useless but with adhd, this can occupy me for a good 5 hours and im also trying to add something that puts DVD logo in random position whenever i hover mouse over it so i can waste even more time being mesmerized by moving box :D)

EDITTTT: i just didnt use quotation marks :') IM SO STUPID. well, if you want to have script because you have ADHD and need time to waste, please think about making a collab OR IF YOU JUST WANT TO MAKE USELESS AND FUN SCRIPTS THEN PLEASEEEEEE REPLY :> im not very well with coding BUTTTT i have alot of things ive wanted to work on like text/boxes moving to random position whenever its being hovered over OR making useful scripts like on youtube (bringing dislike button back) or other websites like ROBLOX :> if you want to collab, please feel free to reply to this, i dont care how skilled you are, if your intrested in working with me on scripts, thats all i care about :> SO REMEMEBER KIDS, ALWAYS BRACKET YOUR ATTRIBUTES WHEN WORKING WITH CSS >:(


Solution

  • This SO answer (about waiting for the page to be fully rendered before running your script) might help.

    Here is another (very simple example) to review - it shows how to inject a DIV onto a page. Very simple.

    Also, look at all the links in this SO answer, for ideas and inspiration.

    In particular, look at the code in this script -- study it line by line -- it's not as difficult as it looks at first. Look at how the buttons get injected onto the existing web page, and then how they are connected to functions to do stuff.