Etdiyiniz dəyişikliklərin yayımlanandan sonra effekt verməsi üçün brauzerinizin keşini təmizləməyə ehtiyacınız ola bilər. Bunun üçün Chrome, Firefox, Edge, yaxud Safari istifadəçisisinizsə, klaviaturanızın Shift düyməsini sıxaraq brauzerin ⟳ səhifə yeniləmək düyməsini klik edə bilərsiniz.
$(document).ready(function(){// Only run this script on File pages <nowiki>if(mw.config.get('wgNamespaceNumber')===6){// Function to check for Commons duplication and extract the filenamefunctiongetCommonsFilename(){// Locate the duplicates sectionvarduplicatesSection=$('#mw-imagepage-section-duplicates');// Check if the duplicates section existsif(duplicatesSection.length){// Find the link to the Commons filevarcommonsLink=duplicatesSection.find('a.external');if(commonsLink.length){// Extract the filename from the link textvarcommonsFilename=commonsLink.text().replace("Fayl:","").trim();// This should be the local namespacereturncommonsFilename;}}returnnull;}// Get the Commons filename if it existsvarcommonsFilename=getCommonsFilename();if(commonsFilename){// Create the "Add NowCommons" buttonvaraddNowCommonsLink=$('<a>').text('Add NowCommons').attr('href','#').css({'cursor':'pointer','color':'#0645AD','margin-left':'10px',}).click(function(event){event.preventDefault();// Redirect to the edit page with NowCommons markervareditUrl=mw.util.getUrl(mw.config.get('wgPageName'),{action:'edit',nowcommons:commonsFilename});window.location.href=editUrl;});// Add the link to the page (e.g., next to the edit button)$('#ca-edit').after(addNowCommonsLink);}// Automatically insert the NowCommons template and edit summary if the page is in edit modevarurlParams=newURLSearchParams(window.location.search);if(mw.config.get('wgAction')==='edit'&&urlParams.has('nowcommons')){varcommonsFilename=urlParams.get('nowcommons');varnowCommonsTemplate='{{NowCommons|'+commonsFilename+'}}';vareditBox=$('#wpTextbox1');varcurrentText=editBox.val();editBox.val(nowCommonsTemplate+'\n'+currentText);// Set the edit summary. </nowiki>$('#wpSummary').val('Adding NowCommons template for file duplicated on Commons ('+commonsFilename+') ([[User:MGA73/nowcommons.js]])');}}});