Skip to content

Commit

Permalink
'Saviour' of Lost Souls v1.5: bugfix for new close dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
Glorfindel83 committed Apr 13, 2020
1 parent fbe94f7 commit 9d6fbd1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions saviour-of-lost-souls/saviour-of-lost-souls.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// @author Glorfindel
// @updateURL https://raw.githubusercontent.com/Glorfindel83/SE-Userscripts/master/saviour-of-lost-souls/saviour-of-lost-souls.user.js
// @downloadURL https://raw.githubusercontent.com/Glorfindel83/SE-Userscripts/master/saviour-of-lost-souls/saviour-of-lost-souls.user.js
// @version 1.4
// @version 1.5
// @match *://meta.stackexchange.com/questions/*
// @match *://meta.stackoverflow.com/questions/*
// @match *://softwarerecs.stackexchange.com/questions/*
Expand Down Expand Up @@ -231,9 +231,9 @@ function main(question) {
// Flag/vote to close (which one doesn't matter for the API call)
$.post({
url: "https://" + document.location.host + "/flags/questions/" + postID + "/close/add",
data: "fkey=" + fkey + "&closeReasonId=OffTopic&closeAsOffTopicReasonId=" + (window.location.host === "softwarerecs.stackexchange.com" ||
window.location.host === "hardwarerecs.stackexchange.com" ||
window.location.host === "stackapps.com" ? "1" : "8"),
data: "fkey=" + fkey + "&closeReasonId=SiteSpecific&siteSpecificCloseReasonId=" + (window.location.host === "softwarerecs.stackexchange.com" ||
window.location.host === "hardwarerecs.stackexchange.com" ||
window.location.host === "stackapps.com" ? "1" : "8"),
success: function () {
// NICETOHAVE: update close vote count
console.log("Close flag/vote cast.");
Expand Down

0 comments on commit 9d6fbd1

Please sign in to comment.