In today's world, User talk:Evad37/SPS.js occupies a central place in our lives. Whether it is politics, technology, history, or any other area of interest, User talk:Evad37/SPS.js is a topic that sparks the interest and curiosity of millions of people around the world. In this article, we will explore different aspects related to User talk:Evad37/SPS.js, delving into its relevance, its impact on society, and the different perspectives that can be had on this topic. From its origins to its evolution today, User talk:Evad37/SPS.js has been the subject of debate, reflection and analysis, and through this article we will seek to shed light on various aspects that surround it.
| This script has a documentation page at User:Evad37/SPS. |
I don't think this assertion is true. I've seen no evidence that global messages have gone out through this script. Please advise. Chris Troutman (talk) 16:31, 24 May 2018 (UTC)
@Kudpung and Bri: There's a problem with the script: it moved all but one of the pieces and I stopped publication rather than continue into a further mistake. I've moved the missing article and am proceeding with publication manually. Chris Troutman (talk) 23:21, 29 June 2018 (UTC)
}} was the end of the description template, but it wasn't. Maybe add a sanity check that there were no other {{ before it? --DannyS712 (talk) 15:45, 31 March 2019 (UTC)
BTW, this was fixed in this edit, which started using extraJs.parseTemplates to properly parse templates which might contain other templates. - Evad37 23:43, 30 April 2019 (UTC)
@Chris troutman: I noticed that script-assisted publishing for this most recent 30 April Signpost edition added duplicate discussion templates to the bottoms of some (but not all) of the articles. I've removed duplicate comment section templates from: , , , , , , , . Edits like this appear to have added the extra comment box. I'm not sure what the cause is or if I'm missing something, but I just wanted to give a heads up. Airplaneman ✈ 20:10, 30 April 2019 (UTC)
While trying to publish, I got as far as moving the "next issue" pages into the WP namespace and hit "(API error: internal_api_error_DBQueryError)"
. To editor Smallbones: I'll be proceeding manually. Chris Troutman (talk) 00:39, 31 May 2019 (UTC)
In its most recent use to publish the Signpost the template {{pp-semi-indef}} was removed, the script should be updated to include it. The Editor's Apprentice (talk) 03:18, 31 August 2019 (UTC)
@Evad37: Could we make a tweak to the script to restore this edit in future runs? The class helps when targeting the signpost page with userstyles. It looks like we'd only need to modify topwikitext and bottomwikitext (L677 and L680 respectively) to do this. Also the same would be needed for the section above this one. — AfroThundr (u · t · c) 02:33, 25 January 2020 (UTC)
@Evad37: I had some extra time, and took a look through the code for this (looking for any techniques I didn't know) and wanted to do some minor cleanup. Would you mind looking at these changes? Since this is an onwiki script, I can't submit a pull request, but what it does is
promiseWihoutExistsError -> promiseWithoutExistsErrorAnd other such tweaks. There should be no resulting change to the code running. I ran it in dry mode, and everything worked. Thanks, --DannyS712 (talk) 05:37, 25 January 2020 (UTC)
== null to === null. The loose comparison matches both null and undefined (ie when second parameter isn't passed), whereas the strict comparison only matches null. e.g. the following (function(a, b) {
console.log(`${a}==null`, a==null);
console.log(`${a}===null`, a===null);
console.log(`${b}==null`, b==null);
console.log(`${b}===null`, b===null);
})(null);
null==null true
null===null true
undefined==null true
undefined===null false@Evad37: yes, but I checked every caller, and all provide a string (i.e. the null part could be removed entirely) --DannyS712 (talk) 06:05, 25 January 2020 (UTC)
promiseWihoutExistsError -> promiseWithoutExistsErrorfunction(, ({, })makeErrorMsg in favor of extraJs.makeErrorMsgIt still shouldn't affect the result, with the exception of the addition of {{sudo}}. Thanks, --DannyS712 (talk) 04:46, 27 January 2020 (UTC)
@Evad37: I ran through the script a bunch of times in dry mode in preparation for being the publication manager this month, and noticed that for the main page wikitext preview (and rendered preview) the links to everything but the first article are wrong. Looking at the wikitext, I see that there are a bunch of {{Wikipedia:Wikipedia Signpost/Templates/Issue|1}} instances which, while correct for the actual edit, render the preview wrong - the first instance is replaced by the code
var previewMainWikitext = request.text
.replace( // Use today's date
"{{Wikipedia:Wikipedia Signpost/Templates/Issue|1}}",
new Date().toISOString().slice(0, 10)
).replace( // Increment issue number. Won't be correct for first issue of the year, but probably good enough for a preview.
"{{Str right|{{Wikipedia:Wikipedia Signpost/Templates/Issue|2}}|10}}",
"issue {{#expr:1+{{Str right|{{Wikipedia:Wikipedia Signpost/Templates/Issue|2}}|16}}}}"
);
but this does not replace *all* of the occurrences, just the first. Would it be possible to switch this to replace them all? Thanks, --DannyS712 (talk) 20:16, 28 March 2021 (UTC)
new RegExp(mw.util.escapeRegExp("{{Wikipedia:Wikipedia Signpost/Templates/Issue|1}}"),"g"),
Eg for the page Wikipedia:Wikipedia Signpost/2021-09-26 - this gets transcluded in the mass message, and eventually the bot comes and protects it as widely transcluded (last month Special:PageHistory/Wikipedia:Wikipedia Signpost/2021-08-29) but the faster the better. DannyS712 (talk) 20:57, 26 September 2021 (UTC)
Just ran across what appears to be a bug: . The word "nullified" was changed to "ified" as the script did its thing. GorillaWarfare (she/her • talk) 22:25, 30 January 2022 (UTC)
var helperPatt = ( helperTemplate ) ? new RegExp('\\n?'+mw.util.escapeRegExp(helperTemplate.wikitext)) : null;var updatedWikitext = article.wikitext.replace(helperPatt, '')RUH ROH!!!!! I am just seeing this now. I guess that is a problem because I am now the only one who maintains this darn script... jp×g 11:50, 22 December 2022 (UTC)
@JPxG (and other page watchers), I have a note for the future and what appears to be a bug to report with the current implementation.
massmsg at the end of the message definition puts the bullets on the same line as the div surrounding them. This causes them to fail to display correctly as a list; see . This is the bug. (Should be trivially fixable without consideration for item 2.)hlist will Sooner rather than Later be in TemplateStyles rather than in Common.css (see MediaWiki talk:Common.css/to do#description and section Hlist). That means massmsg will instead need to use one of the templates that will provide the class and styles. In this context, either {{flatlist}} or {{hlist}} will be sufficient. The use of {{hlist}} will also make item 1 simple to implement, separate to a fix for item 1.