Skip to content

Commit

Permalink
[Log Form] Log template "Last Cache-Log" inserts old Log instead of l…
Browse files Browse the repository at this point in the history
…ast one

#2542
  • Loading branch information
2Abendsegler authored Aug 12, 2024
1 parent fc76fc3 commit f0e76fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gc_little_helper_II.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5120,9 +5120,9 @@ var mainGC = function() {
// Save last log text.
function saveLastLog() {setValue("last_logtext", $('#gc-md-editor_md')[0].value);}
function buildClickForSaveLastLog(waitCount) {
if ($('button.submit-button')[0] && !$('button.submit-button.gclh_build_click')[0]) {
$('button.submit-button')[0].addEventListener('click', saveLastLog, true);
$('button.submit-button').addClass('gclh_build_click');
if ($('.post-button-container')[0] && !$('.post-button-container.gclh_save_last_log')[0]) {
$('.post-button-container').bind('click', () => { saveLastLog() });
$('.post-button-container').addClass('gclh_save_last_log');
}
waitCount++; if (waitCount <= 50) setTimeout(function(){buildClickForSaveLastLog(waitCount);}, 200);
}
Expand Down

0 comments on commit f0e76fe

Please sign in to comment.