diff --git a/assets/js/editcounter.js b/assets/js/editcounter.js index 159ef3aef..ba59369f6 100644 --- a/assets/js/editcounter.js +++ b/assets/js/editcounter.js @@ -317,7 +317,7 @@ xtools.editcounter.setupMonthYearChart = function (id, datasets, labels, maxTota xtools.editcounter.setupSizeHistogram = function (data, colors, barLabels) { let bars = 11; // First sanitize input, to get array. - let total = Object.keys(data).length - 3; // -3 to exclude small edits, large edits and average + let total = Object.keys(data).length; data.length = total; data = Array.from(data) // Then make datasets diff --git a/i18n/en.json b/i18n/en.json index 80a045073..81f24d9c0 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -43,6 +43,7 @@ "auto-contribs-use-tool": "Show only edits using the tool:", "auto-edits": "(Semi-)automated edits", "auto-edits-bot": "This user is a bot. All edits may be automated. Statistics shown here are based on edits made using known tools.", + "auto-edits-tagged": "Tagged (semi-)automated edits", "auto-edits-counts-desc": "Some tool usage overlaps (e.g. rolling back to a revision that is a redirect counts as Rollback and as Redirect), so the total of edits made with each tool may differ from the $1.", "auto-edits-counts-desc-grand-total": "grand total", "auto-edits-logged-out": "You must login to use the sandbox configuration. Using production configuration instead.", diff --git a/i18n/qqq.json b/i18n/qqq.json index 3317c016b..9ce8eb86a 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -62,6 +62,7 @@ "auto-contribs-use-tool": "Label for dropdown that limits results to edits made by the selected (semi-)automated tool. The dropdown is located immediately after the label.", "auto-edits": "(semi-)automated edits with known tools like Huggle", "auto-edits-bot": "Message shown at the top of the AutoEdits tool for users who are a bot, explaining that all edits made by the bot may be automated, even if XTools says they are not.", + "auto-edits-tagged": "Label for the very approximate count of tagged (semi-)automated edits in the last 5000 edits in the Edit Counter.", "auto-edits-counts-desc": "In the AutoEdits tool, this message explains how the totals of individual tools (shown in the '(semi-)automated edits' section) may be different from the total shown in the 'Summary' section. $1 is a link to the 'Summary' section with the message 'auto-edits-counts-grand-total' as the link text.", "auto-edits-counts-desc-grand-total": "The text 'grand total'. This is used as the text for the link in the 'auto-edits-counts-desc' message.", "auto-edits-logged-out": "Message shown when the user attempts to use the AutoEdits tool in sandbox mode, but hasn't logged in.", diff --git a/public/build/app.93b4ef2d.js b/public/build/app.93b4ef2d.js new file mode 100644 index 000000000..6c7ad7449 --- /dev/null +++ b/public/build/app.93b4ef2d.js @@ -0,0 +1,2 @@ +/*! For license information please see app.93b4ef2d.js.LICENSE.txt */ +(self.webpackChunkxtools=self.webpackChunkxtools||[]).push([[524],{3441:()=>{xtools.adminstats={},$((function(){var t=$("#project_input"),e=t.val();0!==$("body.adminstats, body.patrollerstats, body.stewardstats").length&&(xtools.application.setupMultiSelectListeners(),$(".group-selector").on("change",(function(){$(".action-selector").addClass("hidden"),$(".action-selector--"+$(this).val()).removeClass("hidden"),$(".xt-page-title--title").text($.i18n("tool-"+$(this).val()+"stats")),$(".xt-page-title--desc").text($.i18n("tool-"+$(this).val()+"stats-desc"));var n=$.i18n("tool-"+$(this).val()+"stats")+" - "+$.i18n("xtools-title");document.title=n,history.replaceState({},n,"/"+$(this).val()+"stats"),"steward"===$(this).val()?(e=t.val(),t.val("meta.wikimedia.org")):t.val(e),xtools.application.setupMultiSelectListeners()})))}))},9654:(t,e,n)=>{n(8636),n(5086),$((function(){if($("body.authorship").length){var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},5611:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(2231),n(115),xtools.autoedits={},$((function(){if($("body.autoedits").length){var t=$(".contributions-container"),e=$("#tool_selector");if(e.length)return xtools.autoedits.fetchTools=function(t){e.prop("disabled",!0),$.get("/api/project/automated_tools/"+t).done((function(t){t.error||(delete t.project,delete t.elapsed_time,e.html('"),Object.keys(t).forEach((function(n){e.append('")}))),e.prop("disabled",!1)}))},$(document).ready((function(){$("#project_input").on("change.autoedits",(function(){xtools.autoedits.fetchTools($("#project_input").val())}))})),void xtools.autoedits.fetchTools($("#project_input").val());if(xtools.application.setupToggleTable(window.countsByTool,window.toolsChart,"count",(function(t){var e=0;Object.keys(t).forEach((function(n){e+=parseInt(t[n].count,10)}));var n=Object.keys(t).length;$(".tools--tools").text(n.toLocaleString(i18nLang)+" "+$.i18n("num-tools",n)),$(".tools--count").text(e.toLocaleString(i18nLang))})),t.length){var n=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions";xtools.application[n]((function(t){return"".concat(t.target,"-contributions/").concat(t.project,"/").concat(t.username)+"/".concat(t.namespace,"/").concat(t.start,"/").concat(t.end)}),t.data("target"))}}}))},3600:(t,e,n)=>{n(7136),n(173),n(9073),n(6048),n(8636),n(5086),xtools.blame={},$((function(){if($("body.blame").length){$(".diff-empty").length===$(".diff tr").length-1&&$(".diff-empty").eq(0).text("(".concat($.i18n("diff-empty").toLowerCase(),")")).addClass("text-muted text-center").prop("width","20%"),$(".diff-addedline").each((function(){var t=xtools.blame.query.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e=function(e){var n=new RegExp("(".concat(t,")"),"gi");$(e).html($(e).html().replace(n,"$1"))};$(this).find(".diffchange-inline").length?$(".diffchange-inline").each((function(){e(this)})):e(this)}));var t=$("#show_selector");t.on("change",(function(t){$(".show-option").addClass("hidden").find("input").prop("disabled",!0),$(".show-option--".concat(t.target.value)).removeClass("hidden").find("input").prop("disabled",!1)})),window.onload=function(){return t.trigger("change")}}}))},514:(t,e,n)=>{function a(t,e){xtools.categoryedits.$select2Input.data("select2")&&(xtools.categoryedits.$select2Input.off("change"),xtools.categoryedits.$select2Input.select2("val",null),xtools.categoryedits.$select2Input.select2("data",null),xtools.categoryedits.$select2Input.select2("destroy"));var n=e||xtools.categoryedits.$select2Input.data("ns"),a={ajax:{url:t||xtools.categoryedits.$select2Input.data("api"),dataType:"jsonp",jsonpCallback:"categorySuggestionCallback",delay:200,data:function(t){return{action:"query",list:"prefixsearch",format:"json",pssearch:t.term||"",psnamespace:14,cirrusUseCompletionSuggester:"yes"}},processResults:function(t){var e=t?t.query:{},a=[];return e&&e.prefixsearch.length&&(a=e.prefixsearch.map((function(t){var e=t.title.replace(new RegExp("^"+n+":"),"");return{id:e.replace(/ /g,"_"),text:e}}))),{results:a}}},placeholder:$.i18n("category-search"),maximumSelectionLength:10,minimumInputLength:1};xtools.categoryedits.$select2Input.select2(a)}n(475),n(8476),n(5086),n(8379),n(7899),n(2231),n(9581),n(7136),n(173),n(9073),n(6048),xtools.categoryedits={},$((function(){$("body.categoryedits").length&&$(document).ready((function(){var t;xtools.categoryedits.$select2Input=$("#category_selector"),a(),$("#project_input").on("xtools.projectLoaded",(function(t,e){$.get(xtBaseUrl+"api/project/namespaces/"+e.project).done((function(t){a(t.api,t.namespaces[14])}))})),$("form").on("submit",(function(){$("#category_input").val(xtools.categoryedits.$select2Input.val().join("|"))})),xtools.application.setupToggleTable(window.countsByCategory,window.categoryChart,"editCount",(function(t){var e=0,n=0;Object.keys(t).forEach((function(a){e+=parseInt(t[a].editCount,10),n+=parseInt(t[a].pageCount,10)}));var a=Object.keys(t).length;$(".category--category").text(a.toLocaleString(i18nLang)+" "+$.i18n("num-categories",a)),$(".category--count").text(e.toLocaleString(i18nLang)),$(".category--percent-of-edit-count").text(100*(e/xtools.categoryedits.userEditCount).toLocaleString(i18nLang)+"%"),$(".category--pages").text(n.toLocaleString(i18nLang))})),$(".contributions-container").length&&(t=$(".contributions-table").length?"setupContributionsNavListeners":"loadContributions",xtools.application[t]((function(t){return"categoryedits-contributions/"+t.project+"/"+t.username+"/"+t.categories+"/"+t.start+"/"+t.end}),"Category"))}))}))},5779:(t,e,n)=>{function a(t){$("#project_input").val(xtools.application.vars.lastProject),$(".site-notice").append("
"+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;r"+a+""))}))}else $(".textshares-table").length&&t()}}))},1595:(t,e,n)=>{n(8476),n(5086),n(8379),n(7899),n(4867),n(9389),n(6048),n(8636),xtools.pages={},$((function(){if($("body.pages").length){var t={};xtools.application.setupToggleTable(window.countsByNamespace,window.pieChart,"count",(function(t){var e={count:0,deleted:0,redirects:0};Object.keys(t).forEach((function(n){e.count+=t[n].count,e.deleted+=t[n].deleted,e.redirects+=t[n].redirects})),$(".namespaces--namespaces").text(Object.keys(t).length.toLocaleString()+" "+$.i18n("num-namespaces",Object.keys(t).length)),$(".namespaces--pages").text(e.count.toLocaleString()),$(".namespaces--deleted").text(e.deleted.toLocaleString()+" ("+(e.deleted/e.count*100).toFixed(1)+"%)"),$(".namespaces--redirects").text(e.redirects.toLocaleString()+" ("+(e.redirects/e.count*100).toFixed(1)+"%)")})),$(".deleted-page").on("mouseenter",(function(e){var n=$(this).data("page-title"),a=$(this).data("namespace"),o=$(this).data("datetime").toString(),i=$(this).data("username"),r=function(t){$(e.target).find(".tooltip-body").html(t)};if(void 0!==t[a+"/"+n])return r(t[a+"/"+n]);var s=function(){r(""+$.i18n("api-error","Deletion Summary API")+"")};$.ajax({url:xtBaseUrl+"pages/deletion_summary/"+wikiDomain+"/"+i+"/"+a+"/"+n+"/"+o}).done((function(e){if(null===e.summary)return s();r(e.summary),t[a+"/"+n]=e.summary})).fail(s)}))}}))},1223:()=>{xtools.topedits={},$((function(){$("body.topedits").length&&$("#namespace_select").on("change",(function(){$("#page_input").prop("disabled","all"===$(this).val())}))}))},7852:(t,e,n)=>{var a,o,i,s;function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}n(7136),n(6255),n(2231),n(4913),n(6088),n(9389),n(5086),n(6048),n(8665),n(4602),n(115),n(8476),n(9693),n(475),n(9581),n(2982),n(4009),n(17),n(2157),n(8763),n(9560),n(5852),n(8379),n(7899),n(533),n(4538),n(1145),n(6943),n(8772),n(5231),n(4867),n(4895),n(4189),n(557),n(8844),n(2006),n(3534),n(590),n(4216),n(9979),s=function(){return function t(e,n,a){function o(r,s){if(!n[r]){if(!e[r]){if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,n,a)}return n[r].exports}for(var i=void 0,r=0;r