In this article, we will approach
User:Danski454/ReviewWarn.js from different perspectives, with the aim of providing a comprehensive view on this topic/person/date. We will analyze its impact on today's society, its evolution over time and the possible implications it has in various areas. In addition, we will examine its relevance in the current context, as well as the different opinions and theories that exist in this regard. Through this comprehensive analysis, we aim to provide the reader with a more complete understanding of
User:Danski454/ReviewWarn.js and encourage reflection on its importance in our daily lives.
var reverteduser = null;
$(document).ready(function(){
if(mw.config.get( 'wgPageName' ) === 'Special:RevisionReview' && mw.config.get( 'wgUserGroups' ) !== null &&
( mw.config.get( 'wgUserGroups' ).indexOf('sysop') !== -1 || mw.config.get( 'wgUserGroups' ).indexOf('reviewer') !== -1 )){ //only run if user can review and is on Special:RevisionReview
$('#mw-content-text bdi').each(function( index ) { // check if all revisions were madeby the same user, if so, reverteduser holds their UN oterwise it is null
if (index === 0){
reverteduser = $(this).text();
} else{
if (reverteduser !== $(this).text()){
reverteduser = null;
}
}
});
if (reverteduser !== null){
$('form').attr('onsubmit', 'return ReviewWarnLoadUserTalk()');
console.log('ReviewWarn:: linked reject button to User talk:' + reverteduser);
}
}
});
function ReviewWarnLoadUserTalk(){
var revertedpage = $('#mw-content-text .plainlinks a').first().text();
window.open('https://en.wikipedia.org/w/index.php?title=User_talk:' + encodeURIComponent(reverteduser.replace(' ', '_')) + '&action=edit&preview=yes&vanarticle=' + encodeURIComponent(revertedpage));
return true; //submit the form
}