MediaWiki:Common.js

From Startupidia
Revision as of 17:08, 21 July 2025 by Startupedia (talk | contribs) (Checking bugs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* Any JavaScript here will be loaded for all users on every page load. */

$(document).ready(function() {
    // Create a <script> tag for schema markup
    var schemaScript = document.createElement('script');
    schemaScript.type = 'application/ld+json';
    schemaScript.text = JSON.stringify({
        "@context": "http://schema.org",
        "@type": "WebSite",
        "name": "Startupidia",
        "url": "https://startupidia.org",
        "description": "Startupidia is an innovative, dedicated encyclopedia designed to serve as a comprehensive resource for the startup ecosystem.",
        "publisher": {
            "@type": "Organization",
            "name": "Startupidia",
            "url": "https://startupidia.org",
            "logo": {
                "@type": "ImageObject",
                "url": "https://startupidia.org/resources/assets/Startupeidia_Logo.png",
                "caption": "Startupidia Logo"
            }
        },
        "potentialAction": {
            "@type": "SearchAction",
            "target": "https://startupidia.org/index.php?title=Special:Search&search={search_term_string}",
            "query-input": "required name=search_term_string"
        }
    });
    document.head.appendChild(schemaScript);
});

$(function () {
  $('a.external').attr('target', '_blank');
});