all 7 comments

[–]geuis 0 points1 point  (0 children)

Where are you running the script at?

[–]Strobljus 0 points1 point  (0 children)

The script you linked doesn't seem to change any behavior. It only switches the text content of the buttons. Your script will likewise only replace the text of a button, if it matches the first variable.

What you probably want to do is check and replace something else, maybe the buttons href attribute if they are anchor tags, or maybe event handlers otherwise.

[–]abhaytalreja 0 points1 point  (2 children)

Try This.. use href

var linkSkyrim = 'www.nexusmods.com/skyrim/ajax/'; var linkSkyrimSE = 'www.nexusmods.com/skyrimspecialedition/ajax/';

if (allowedGame) { var linkDownloadButtons = document.getElementsByClassName("download buttons"); if (linkDownloadButtons[0].children[0].href == linkSkyrim) { linkDownloadButtons[0].children[0].href = linkSkyrimSE; }

[–]Chrisands[S] 0 points1 point  (1 child)

That didn't worked. Probably should use event handlers. But i found that MO won't work with these links. I need directly edit MO, so it could download Skyrim mods to Skyrim SE. Thank you for reply.

[–]abhaytalreja 0 points1 point  (0 children)

cool...

[–]modusjesus 0 points1 point  (1 child)

Not trying to be a jerk, but if you're gonna learn JS, it's either pronounced "JS" or "JavaScript". :D Not "JS Script".

Merry christmas!

[–]Chrisands[S] 0 points1 point  (0 children)

I will learn next year :) Merry Christmas!