MediaWiki:Common.js: Difference between revisions
No edit summary Tag: Manual revert |
No edit summary Tag: Reverted |
||
| Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
$(document).ready(function() { | |||
// Target all search result containers | |||
$('.searchresult').each(function() { | |||
// Get the current content of the search result | |||
let content = $(this).html(); | |||
// Remove any {{#seo: ... }} tags | |||
content = content.replace(/{{#seo:[^}]*}}/g, ''); | |||
// Update the HTML of the search result with the cleaned content | |||
$(this).html(content); | |||
}); | |||
}); | |||
Revision as of 03:45, 23 October 2024
/* Any JavaScript here will be loaded for all users on every page load. */
$(document).ready(function() {
// Target all search result containers
$('.searchresult').each(function() {
// Get the current content of the search result
let content = $(this).html();
// Remove any {{#seo: ... }} tags
content = content.replace(/{{#seo:[^}]*}}/g, '');
// Update the HTML of the search result with the cleaned content
$(this).html(content);
});
});