Skip to content

Commit

Permalink
Delete version (wikimedia-gadgets#276)
Browse files Browse the repository at this point in the history
* Delete version number from files, documentation, and edit summaries.
* Delete version from the front end

Fix wikimedia-gadgets#270
  • Loading branch information
NovemLinguae authored Dec 19, 2023
1 parent 5f31392 commit ed134aa
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 19 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "afc-helper",
"version": "0.9.1",
"description": "A tool for reviewing Articles for Creation submissions on the English Wikipedia.",
"homepage": "https://github.com/wikimedia-gadgets/afc-helper",
"bugs": {
Expand Down
12 changes: 2 additions & 10 deletions src/modules/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,8 @@
AFCH.preferences = new AFCH.Preferences();
AFCH.prefs = AFCH.preferences.prefStore;

// Must be defined above the larger $.extend block
// because AFCH.consts.summaryAd depends on it
AFCH.consts.version = '0.9.1';

// Add more constants -- don't overwrite those already set, though
AFCH.consts = $.extend( AFCH.consts, {
versionName: 'Imperial Ibex',

// If true, the script will NOT modify actual wiki content and
// will instead mock all such API requests (success assumed)
mockItUp: AFCH.consts.mockItUp || false,
Expand All @@ -86,7 +80,7 @@
user: mw.user.getName(),

// Edit summary ad
summaryAd: ' ([[WP:AFCH|AFCH]] ' + AFCH.consts.version + ')',
summaryAd: ' ([[WP:AFCH|AFCH]])',

// Require users to be on whitelist to use the script
// Testwiki users don't need to be on it
Expand Down Expand Up @@ -239,7 +233,7 @@
.addClass( 'feedback-link link' )
.click( function () {
feedback.launch( {
subject: '[' + AFCH.consts.version + '] ' + ( type ? 'Feedback about ' + type : 'AFCH feedback' )
subject: ( type ? 'Feedback about ' + type : 'AFCH feedback' )
} );
} )
.appendTo( $element );
Expand Down Expand Up @@ -1292,8 +1286,6 @@
// of the preferences as variables, as well as an additional few used in other locations.
this.$dialog.empty().append(
this.views.renderView( 'preferences', $.extend( {}, this.prefStore, {
version: AFCH.consts.version,
versionName: AFCH.consts.versionName,
userAgent: window.navigator.userAgent
} ) )
);
Expand Down
10 changes: 4 additions & 6 deletions src/modules/submissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@
.append(
$( '<div>' )
.addClass( 'initial-header' )
.text( 'Loading AFCH v' + AFCH.consts.version + '...' )
.text( 'Loading AFCH ...' )
)
);

Expand Down Expand Up @@ -856,9 +856,7 @@
decline: submission.isCurrentlySubmitted,
comment: true, // Comments are always okay!
submit: !submission.isCurrentlySubmitted,
alreadyUnderReview: submission.isUnderReview,
version: AFCH.consts.version,
versionName: AFCH.consts.versionName
alreadyUnderReview: submission.isUnderReview
} );

// Set up the extra options slide-out panel, which appears
Expand Down Expand Up @@ -1411,8 +1409,8 @@
*/
function loadWikiProjectList() {
var deferred = $.Deferred(),
// This is so a new version of AFCH will invalidate the WikiProject cache
lsKey = 'mw-afch-' + AFCH.consts.version + '-wikiprojects-2',
// Left over from when a new version of AFCH would invalidate the WikiProject cache. The lsKey doesn't change nowadays though.
lsKey = 'mw-afch-wikiprojects-2',
wikiProjects = mw.storage.getObject( lsKey );

if ( wikiProjects ) {
Expand Down
2 changes: 1 addition & 1 deletion src/templates/tpl-preferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- preferences -->
<div class="afch afch-form afch-preferences">
<div class="details centered">
<strong>AFCH v{{version}} / {{versionName}}</strong>
<strong>AFCH</strong>
<div>User-Agent: {{userAgent}}</div>
</div>
<div id="autoOpenWrapper">
Expand Down
2 changes: 1 addition & 1 deletion src/templates/tpl-submissions.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- main -->
<div class="review-panel initial">
<div class="initial-header">
<span>AFCH v<span title="{{versionName}}">{{version}}</span>&nbsp;
<span>AFCH&nbsp;
(<!-- Disabled due to issue #71 <span class="feedback-wrapper"></span> | --><span class="preferences-wrapper"></span>)</span>
Reviewing "{{title}}"
</div>
Expand Down

0 comments on commit ed134aa

Please sign in to comment.