Skip to content

Commit

Permalink
Sync diff-permalink with upstream (fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amorymeltzer committed Nov 14, 2023
1 parent 91f17f4 commit 7c9810d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions userScripts/diff-permalink.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ $.when( $.ready, mw.loader.using( [ "mediawiki.util" ] ) ).then( function () {
}
page = "Special:Diff/" + suffix;
} else {
var oldidMatch = mw.util.getParamValue( "oldid" );
if( oldidMatch ) {
page = "Special:Permalink/" + oldidMatch;
// If "oldid" is present in the URL, show an appropriate rev id there as well.
if( mw.util.getParamValue( "oldid" ) ) {
page = "Special:Permalink/" + mw.config.get( "wgRevisionId" );
} else return; // nothing to do here
}

Expand Down
2 changes: 1 addition & 1 deletion userScripts/modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ if (cfg.wgCanonicalNamespace === 'Special') {
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Enterprisey/link-deleted-revs.js&oldid=954758921&action=raw&ctype=text/javascript'); // [[User:Enterprisey/link-deleted-revs.js]], [[User:Enterprisey/link-deleted-revs]]
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Enterprisey/diff-context.js&oldid=980040434&action=raw&ctype=text/javascript'); // [[User:Enterprisey/diff-context.js]], [[User:Enterprisey/diff-context]]
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Enterprisey/offset-history-link.js&oldid=1060844701&action=raw&ctype=text/javascript'); // [[User:Enterprisey/offset-history-link.js]], [[User:Enterprisey/offset-history-link]]
// mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Enterprisey/diff-permalink.js&oldid=1050007234&action=raw&ctype=text/javascript'); // placeholder
// mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Enterprisey/diff-permalink.js&oldid=1184853636&action=raw&ctype=text/javascript'); // placeholder
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Amorymeltzer/diff-permalink.js&action=raw&ctype=text/javascript'); // [[User:Enterprisey/diff-permalink.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Jon_Harald_Søby/diffedit.js&oldid=22620102&action=raw&ctype=text/javascript'); // [[meta:User:Jon_Harald_Søby/diffedit.js]], [[meta:User:Jon_Harald_Søby/diffedit]]
}
Expand Down

0 comments on commit 7c9810d

Please sign in to comment.