|
8 | 8 | // @contributor J F |
9 | 9 | // @contributor Glorfindel |
10 | 10 | // @attribution Brock Adams (https://github.com/BrockA) |
11 | | -// @version 1.20.1 |
| 11 | +// @version 1.20.2 |
12 | 12 | // @updateURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fdsc/fdsc.meta.js |
13 | 13 | // @downloadURL https://raw.githubusercontent.com/Charcoal-SE/Userscripts/master/fdsc/fdsc.user.js |
14 | 14 | // @supportURL https://github.com/Charcoal-SE/Userscripts/issues |
|
233 | 233 | */ |
234 | 234 | fdsc.reportPost = function (postUrl) { |
235 | 235 | if (StackExchange.options.user.isModerator) { |
236 | | - return; |
| 236 | + return; // the post will be deleted and Smokey can't fetch it via the API |
237 | 237 | } |
238 | 238 | debug("entering reportPost"); |
239 | 239 | debug("write token:", fdsc.msWriteToken); |
|
389 | 389 | var writeTokenButton = false; |
390 | 390 |
|
391 | 391 | if (!fdsc.msWriteToken || fdsc.msWriteToken === "null") { |
392 | | - status += " - <a href='#' id='get-write-token'>get write token</a></div>"; |
| 392 | + status += " - <a href='#' id='get-write-token'>get write token</a>"; |
393 | 393 | writeTokenButton = true; |
394 | 394 | } |
395 | 395 |
|
396 | 396 | if (isFlagged || isAutoflagged) { |
397 | | - status += " - <a href='#' id='autoflag-tp' " + tpButtonStyle + ">tpu-</a></div>"; |
| 397 | + status += " - <a href='#' id='autoflag-tp' " + tpButtonStyle + ">tpu-</a>"; |
398 | 398 | } |
399 | 399 |
|
400 | 400 | if (tps === 0) { |
401 | | - status += " - <a href='#' id='feedback-fp' " + fpButtonStyle + ">false positive?</a></div>"; |
402 | | - } else { |
403 | | - // If someone else has already marked as tp, you should mark it as fp in chat where you can discuss with others. |
404 | | - // Hence, do not display the false positive button |
405 | | - status += "</div>"; |
| 401 | + status += " - <a href='#' id='feedback-fp' " + fpButtonStyle + ">false positive?</a>"; |
406 | 402 | } |
| 403 | + // If someone else has already marked as tp, you should mark it as fp in chat where you can discuss with others. |
| 404 | + // Hence, do not display the false positive button |
| 405 | + |
| 406 | + status += "</div>"; |
407 | 407 | $(".popup-actions").prepend(status); |
408 | 408 | // On click of the false positive button |
409 | 409 | registerFeedbackButton("#feedback-fp", "fp-", "Reporting as false positive"); |
|
457 | 457 | } else if (feedbackType === "tpu-" && fdsc.postFound === false) { |
458 | 458 | if (!fdsc.msWriteToken || fdsc.msWriteToken === "null") { |
459 | 459 | fdsc.getWriteToken(true, function () { |
460 | | - fdsc.reportPost(fdsc.constructUrl(fdsc.container)); // container variable defined on line 299 |
| 460 | + fdsc.reportPost(fdsc.constructUrl(container)); |
461 | 461 | }); |
462 | 462 | } else { |
463 | | - fdsc.reportPost(fdsc.constructUrl(fdsc.container)); |
| 463 | + fdsc.reportPost(fdsc.constructUrl(container)); |
464 | 464 | } |
465 | 465 | } |
466 | 466 | }); |
|
0 commit comments