Jump to content

MediaWiki:Common.js: Difference between revisions

From Event Gates Wiki
No edit summary
No edit summary
Line 1: Line 1:
$(function () {
$(function () {
   $('#p-navigation .body').append('<div id="p-test-portlet"><h3>Test Portlet</h3><p>Test content here</p></div>');
  // Append a simple box with heading and paragraph inside the navigation sidebar
   console.log('Appended test portlet content');
   $('#p-navigation .body').append(`
    <div id="p-test-portlet" style="padding:10px; border:1px solid #ccc; margin-top:10px;">
      <h3>Test Portlet</h3>
      <p>This is a test content injected directly into the sidebar.</p>
    </div>
  `);
   console.log('Injected test HTML into sidebar');
});
});

Revision as of 17:25, 3 July 2025

$(function () {
  // Append a simple box with heading and paragraph inside the navigation sidebar
  $('#p-navigation .body').append(`
    <div id="p-test-portlet" style="padding:10px; border:1px solid #ccc; margin-top:10px;">
      <h3>Test Portlet</h3>
      <p>This is a test content injected directly into the sidebar.</p>
    </div>
  `);
  console.log('Injected test HTML into sidebar');
});