Skip to content

Commit 965b4c3

Browse files
Fix close-question-link selector change too
1 parent 99cccbe commit 965b4c3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

One-Click-VTC/src/canCreateInterface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const canCreateInterface = () => {
5151
if (questionTitle.endsWith(' [closed]') || questionTitle.endsWith(' [duplicate]')) {
5252
return;
5353
}
54-
const closeQuestionLink = document.querySelector<HTMLAnchorElement>('.close-question-link');
54+
const closeQuestionLink = document.querySelector<HTMLAnchorElement>('.js-close-question-link');
5555
if (closeQuestionLink && closeQuestionLink.title.includes('You voted')) {
5656
return;
5757
}

One-Click-VTC/src/tryVoteClose/makeHandleCloseVoteResponse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const makeHandleCloseVoteResponse = (questionId: number, setCanSendReques
3232
if (window.StackExchange.options.user.rep < 3000) {
3333
/* User flagged to close, but did not vote to close
3434
* If someone has the VTC privilege, it's easy to determine, on pageload, if they've already VTC'd
35-
* by examining the .close-question-link title
35+
* by examining the .js-close-question-link title
3636
* Doesn't look like there's anything similar for flags without actually opening the close dialog,
3737
* so save close flags in Local Storage instead
3838
*/
@@ -53,7 +53,7 @@ const updateCloseVoteCount = (result: CloseVoteResponse) => {
5353
};
5454
const { updateCloseLinkCount } = (window.StackExchange as unknown as SETypeHere).vote_closingAndFlagging;
5555
const haveSEUpdateCloseLinkCount = () => {
56-
updateCloseLinkCount(result, window.$('.close-question-link'));
56+
updateCloseLinkCount(result, window.$('.js-close-question-link'));
5757
};
5858
haveSEUpdateCloseLinkCount();
5959
// If the question had an edit notice, and the downvote button was .click()ed, the postcell will be refreshed,

One-Click-VTC/src/tryVoteClose/openDuplicateModal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const openDuplicateModal = () => {
2-
document.querySelector<HTMLAnchorElement>('.close-question-link')!.click();
2+
document.querySelector<HTMLAnchorElement>('.js-close-question-link')!.click();
33
const handler = (_event: unknown, _jqXHR: unknown, ajaxOptions: JQuery.AjaxSettings<unknown>) => {
44
if (!ajaxOptions.url || !/\/flags\/questions\/\d+\/close\/popup/.test(ajaxOptions.url)) {
55
return;

0 commit comments

Comments
 (0)