diff --git a/Flag-from-User-Pages/Flag_from_User_Pages.user.js b/Flag-from-User-Pages/Flag_from_User_Pages.user.js index bfd51c6..9719a46 100644 --- a/Flag-from-User-Pages/Flag_from_User_Pages.user.js +++ b/Flag-from-User-Pages/Flag_from_User_Pages.user.js @@ -30,16 +30,16 @@ ['question', 'answer'].forEach((type) => { $('a.' + type + '-hyperlink').each(function() { const $this = $(this); - const currentFlag = $this.parent().find('.flag-post-link'); + const currentFlag = $this.parent().find('.js-flag-post-link'); if (!currentFlag.length) { const href = $this.attr('href'); if (href) { const matches = type === 'answer' ? href.match(/^.*#(\d+)$/) : href.match(/^\/q(?:uestions)?\/(\d+)\/.*$/); if (matches && matches[1]) { const postId = matches[1]; - $this.before('').css('display', 'inline'); - $this.parent().find('.flag-post-link').data({ - postid: postId, + $this.before('').css('display', 'inline'); + $this.parent().find('.js-flag-post-link').data({ + 'post-id': postId, loadedTimestamp: now, }); }