Topic: Help modifying a script

Posted under e621 Tools and Applications

I'm making some small modifications (adjusting the UI size to 1 wider column instead of 2 short ones) to the script found on this forum post, but I have a problem. The "save changes" button on the new UI doesn't work and nothing I do seems to fix it.

My understanding of scripting is bare minimum (The UI adjustment took long enough), can anyone help me with this? The script has to have worked on the site at one point, I don't know what could have changed.

Updated

It's not really clean, but if you append this code to the end of the file, the save changes button works for me.

document.getElementsByClassName('q-submit')[0]
    .addEventListener('click', () => document.getElementById('edit-form').submit());

And just to clarify, you did get the column width to be one wide like you wanted, correct?

Updated by anonymous

Idem said:
It's not really clean, but if you append this code to the end of the file, the save changes button works for me.

document.getElementsByClassName('q-submit')[0]
    .addEventListener('click', () => document.getElementById('edit-form').submit());

And just to clarify, you did get the column width to be one wide like you wanted, correct?

Yes, thank you. I wanted to just update the original script but I guess the edition doesn't hurt until it does. I'm using tampermonkey and I have no idea what the original script was written for.

Updated by anonymous

Idem said:
It's not really clean, but if you append this code to the end of the file, the save changes button works for me.

document.getElementsByClassName('q-submit')[0]
    .addEventListener('click', () => document.getElementById('edit-form').submit());

And just to clarify, you did get the column width to be one wide like you wanted, correct?

actually it's not working for me. i put it in on line 1109, just before the final closing brackets. Is that the right spot?

Updated by anonymous

FurryMcFuzzball said:
actually it's not working for me. i put it in on line 1109, just before the final closing brackets. Is that the right spot?

You want to put it outside of the braces, on a new line after the semicolon.

It should look like this.

}).mouseleave(function(){
  clearTimeout(qTimer);
  $("#related").show();
});


document.getElementsByClassName('q-submit')[0]
    .addEventListener('click', () => document.getElementById('edit-form').submit())

Updated by anonymous

  • 1