MediaWiki:Common.js: Difference between revisions
Startupedia (talk | contribs) Updated schema markup |
Startupedia (talk | contribs) Checking bugs |
||
Line 2: | Line 2: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
// Add Open Graph meta tags | // Add Open Graph meta tags | ||
var metaTags = [ | var metaTags = [ | ||
Line 50: | Line 23: | ||
canonical.href = 'https://startupidia.org'; | canonical.href = 'https://startupidia.org'; | ||
document.head.appendChild(canonical); | document.head.appendChild(canonical); | ||
// Log for debugging | |||
console.log('Open Graph and canonical tags added'); | |||
}); | }); | ||
Revision as of 17:00, 21 July 2025
/* Any JavaScript here will be loaded for all users on every page load. */ $(document).ready(function() { // Add Open Graph meta tags var metaTags = [ { property: "og:site_name", content: "Startupidia" }, { property: "og:title", content: "Startupidia" }, { property: "og:url", content: "https://startupidia.org" }, { property: "og:description", content: "Startupidia is an innovative, dedicated encyclopedia designed to serve as a comprehensive resource for the startup ecosystem." }, { property: "og:image", content: "https://startupidia.org/resources/assets/Startupeidia_Logo.png" } ]; metaTags.forEach(function(tag) { var meta = document.createElement('meta'); meta.setAttribute('property', tag.property); meta.setAttribute('content', tag.content); document.head.appendChild(meta); }); // Add canonical tag var canonical = document.createElement('link'); canonical.rel = 'canonical'; canonical.href = 'https://startupidia.org'; document.head.appendChild(canonical); // Log for debugging console.log('Open Graph and canonical tags added'); }); $(function () { $('a.external').attr('target', '_blank'); });