Jump to content

User talk:Enterprisey/link-deleted-revs

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

@Enterprisey: So, apparently links can look like &oldid=prev&diff=123456789? I didn't know that until, like, yesterday. There are bigger ramifications, but for this, it means that

var oldid = window.location.search.match( /oldid=(\d+)/ )[1];

will error on such links. ~ Amory (utc) 10:17, 29 April 2020 (UTC)[reply]

Relatedly, since this executes on diffs that are just fine,
data.query.pages[0].deletedrevisions.forEach( function ( rev ) {
will produce a Cannot read property 'forEach' of undefined error. ~ Amory (utc) 20:26, 29 April 2020 (UTC)[reply]

Thank you!

[edit]

I just wanted to say this is amazing. What a time-saver! Thank you :) MusikAnimal talk 21:16, 2 May 2020 (UTC)[reply]