_ _    _ _____  ___   __                       
 __      _(_) | _(_)___ / ( _ ) / /_   ___ ___  _ __ ___  
 \ \ /\ / / | |/ / | |_ \ / _ \| '_ \ / __/ _ \| '_ ` _ \ 
  \ V  V /| |   <| |___) | (_) | (_) | (_| (_) | | | | | |
   \_/\_/ |_|_|\_\_|____/ \___/ \___(_)___\___/|_| |_| |_|

User:Topbanana/RLRL SR Utility.js

In today's world, User:Topbanana/RLRL SR Utility.js is a highly relevant topic that generates great interest and debate in different areas. Since its emergence, it has impacted the way people interact with each other, the way certain activities are carried out, or the way the world is perceived. User:Topbanana/RLRL SR Utility.js has sparked controversy, has been the focal point of investigations and has changed the course of many discussions. In this article, we will explore different aspects related to User:Topbanana/RLRL SR Utility.js, analyze its impact on society and reflect on its relevance in today's world.
// Create some search-and-replace tools - this uses a slightly modified version
// of ])

mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=User:Topbanana/regexReplace.js&action=raw&ctype=text/javascript');

function RLRL_SR_Utility()
{
   strAdvert = '  - ]';

   // Check if we are editing
   if ( document.getElementById("editform") )
   {
      // Check for and extract parameters
      parSearch  = mw.util.getParamValue( 'RLRLS' );
      parReplace  = mw.util.getParamValue( 'RLRLR' );
      parRedirect = mw.util.getParamValue( 'RLRLRD' );

      // First check if we are being asked to create a redirect
     if( parRedirect )
     {
        // Check we have no other parameters
        if( parSearch || parReplace )
          return;
 
        // Check the edit box is empty
        if( document.forms.editform.wpTextbox1.value.length > 0 )
          return;
 
        // Correct the parameters provided
        parRedirect = unescape( decodeURIComponent( parRedirect.replace( /_/g, " " ) ) );

        // Okay, populate the edit box and summary
        document.forms.editform.wpTextbox1.value = '#REDIRECT ]';
        document.forms.editform.wpSummary.value =
            'Link repair:  Redirecting page to ' + parRedirect + strAdvert;
        document.forms.editform.wpWatchthis.checked = false;
 
        return;
     }
 
     // Okay, not a redirect.  Check if we are being asked to search-and-replace
 
     // If we've not got a useful set of parameters, give up   
     if( !parSearch || !parReplace )
       return;
 
     // Correct the parameters provided
     parSearch = unescape( decodeURIComponent( parSearch.replace( /_/g, " " ) ) );
     parReplace = unescape( decodeURIComponent( parReplace.replace( /_/g, " " ) ) );
 
     // Check for Template namespace prefix
     if( parSearch.indexOf( "Template:" ) == 0 &&
         parReplace.indexOf( "Template:" ) == 0 )
     {
        parSearch = parSearch.slice( 9 );
        parReplace = parReplace.slice( 9 );
     }

     // Escape any characters with special meanings in regular expressions
     parRegex = parSearch.replace(/{}()*+?.,\\^$|#\s]/g, "\\$&");

     // Specifically ignore the case of the first letter
     parRegex = '[' + parRegex.substring(0, 1).toUpperCase() +
                parRegex.substring(0, 1).toLowerCase() + ']' +
                parRegex.substring(1);

     // Find and manipulate the search and replace controls
     createRegexControls();
 
     document.getElementById('tbRegex_SearchCaseSensitive').checked = true;
     document.getElementById('tbRegex_SearchTextBox').value = parRegex;
     document.getElementById('tbRegex_FindButton').click();
     document.getElementById('tbRegex_ReplaceTextBox').value = parReplace;
 
     // Populate the edit summary
     document.forms.editform.wpSummary.value =
        'Link repair:  ' + parSearch + ' -> ' + parReplace + strAdvert;
     document.forms.editform.wpMinoredit.checked = true;
   }

   // Check if we are editing
   if ( document.getElementById("movepage") )
   {
      // Check for and extract parameters
      parNewNS    = mw.util.getParamValue( 'RLRLMNS' );
      parNewTitle = mw.util.getParamValue( 'RLRLMNT' );
 
     // If we've not got a useful set of parameters, give up   
     if( !parNewNS || !parNewTitle )
       return;
 
     // Correct the parameters provided
     parNewTitle = unescape( decodeURIComponent( parNewTitle.replace( /_/g, " " ) ) );
 
     document.getElementById('wpNewTitleNs').value = parNewNS;
     document.getElementById('wpNewTitleMain').value = parNewTitle;
 
     // Populate the edit summary
     document.getElementById('wpReason').value = strAdvert;
   }
};
 
addOnloadHook( RLRL_SR_Utility );