In the article
User:Omegatron/monobook.js/autolinker.js we will explore different aspects related to this topic, from its origins to its relevance today. We will analyze how
User:Omegatron/monobook.js/autolinker.js has impacted society and how it has evolved over time. Additionally, we will examine the different perspectives and opinions that exist around
User:Omegatron/monobook.js/autolinker.js, providing a complete and balanced overview of this topic. Throughout the article, we will delve into specific aspects that will help understand the importance and impact of
User:Omegatron/monobook.js/autolinker.js in various areas. Through a critical and reflective approach, we aim to offer our readers a complete and enriching vision of
User:Omegatron/monobook.js/autolinker.js.
/* <pre><nowiki> */
/* Autolink ] and {{templates}} (especially useful for monobook.js and similar pages) */
/* See ] */
/* Shouldn't affect things *inside* HTML tags, either */
addOnloadHook(function () {
// Get the HTML of just the main body of the page, not including textareas hopefully
if (document.getElementById('wikiDiff')) {
targetdiv = document.getElementById('wikiDiff'); // wikiDiff if it's there
} else {
if (document.getElementById('wikiPreview')) {
targetdiv = document.getElementById('wikiPreview'); // wikiPreview if it's there
} else
if (document.getElementById('bodyContent')) {
targetdiv = document.getElementById('bodyContent'); // bodyContent div for most pages
} else
return;
}
var content = targetdiv.innerHTML;
content = content.replace(/()\\|\<\>\n]*)(\<\>\n]*?)?\]{2}(])/g, '$1<a class="autolink" href="https://wiki386.com/en/$2">' + ']</a>$4'); // Make wikilink code into links
content = content.replace(/()\{{2}(subst\:|msg\:)?(*)(*?)?\}{2}()/g, '$1<a class="autolink" href="https://wiki386.com/en/Template:$3">{' + '{$2$3$4}' + '}</a>$5'); // Make template code into links
targetdiv.innerHTML = content; // Write it back
});
/* </nowiki></pre> */