Merge branch 'master' into patch-2
This commit is contained in:
commit
97db76181d
1 changed files with 18 additions and 19 deletions
|
@ -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 0.2
|
||||
// @version 0.3
|
||||
// @match *://meta.stackexchange.com/questions/*
|
||||
// @match *://meta.stackoverflow.com/questions/*
|
||||
// @exclude *://meta.stackexchange.com/questions/ask
|
||||
|
@ -13,7 +13,7 @@
|
|||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
(function () {
|
||||
(function ($) {
|
||||
"use strict";
|
||||
let question = $('#question');
|
||||
|
||||
|
@ -23,12 +23,10 @@
|
|||
// happens with Community Wiki posts
|
||||
return;
|
||||
let reputation = owner.find('span.reputation-score')[0].innerText;
|
||||
if (document.location.host == 'meta.stackexchange.com') {
|
||||
// Simple check: reputation = 1
|
||||
if (reputation != "1")
|
||||
return;
|
||||
if (reputation === "1") {
|
||||
// Do nothing: 1 rep qualifies for a lost soul
|
||||
} else {
|
||||
// Other meta sites require some reputation to post a question, so we need other rules:
|
||||
// Child meta sites require some reputation to post a question, so we need other rules:
|
||||
let isNewContributor = owner.find('span.js-new-contributor-label').length > 0;
|
||||
let hasLowReputation = reputation <= 101; // association bonus
|
||||
let negativeQuestionScore = parseInt(question.find('div.js-vote-count').text()) < 0;
|
||||
|
@ -157,6 +155,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
// TODO: reload page after all calls are finished
|
||||
// Reload page; this is less elegant than waiting for all POST calls but it works.
|
||||
window.setTimeout(() => window.location.reload(false), 800);
|
||||
});
|
||||
})();
|
||||
})(window.jQuery);
|
||||
|
|
Loading…
Reference in a new issue