|
|
| (One intermediate revision by the same user not shown) |
| 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
| |
| var content = $(this).html();
| |
| console.log("Before: ", content); // Log the content before cleaning
| |
|
| |
| // Remove all occurrences of {{#seo: ... }} tags, including multiline
| |
| while (content.match(/{{#seo:[^}]*}}/)) {
| |
| content = content.replace(/{{#seo:[^}]*}}/g, ''); // Remove inline and multiline SEO tags
| |
| }
| |
|
| |
| console.log("After: ", content); // Log the content after cleaning
| |
|
| |
| // Update the HTML of the search result with the cleaned content
| |
| $(this).html(content);
| |
| });
| |
| });
| |
Latest revision as of 03:57, 23 October 2024
/* Any JavaScript here will be loaded for all users on every page load. */