CSS is my thing. Not js apparently. Having an issue on a web page I use and edited the CSS on, that much, the root (/) kinda got lost. I had to sacrifice the home link that is and now I wonder if I can reuse the logout link on the page with a userscript to change that into the pages root instead? I don't really use the log out link :D

The logout link is like: "../?action=logout" and I want it to become: "../" instead. Possible?

So that: http://domain.com/?action=logout and https://domain.com/?action=logout turns into:

http://domain.com/ and https://domain.com/

Is this doable?
Regards
/Michael

Re: @murko69:

Check out querySelector at MDN. You will find it to have familiar CSS selector syntax.

  1. Find the element you are looking for with querySelector
  2. See if it is just a plain href... if so modify it
  3. If it's a JavaScript event listener then it will become a little more complicated as you may need to use preventDefault in a click listener.

MDN has some good examples to get you started. :)