MediaWiki:Common.js: Difference between revisions

From Liberation Map
No edit summary
No edit summary
Line 11: Line 11:
/* Add ID attribute to MLK thumbnail for Ken Burns animation - https://www.kirupa.com/html5/ken_burns_effect_css.htm */
/* Add ID attribute to MLK thumbnail for Ken Burns animation - https://www.kirupa.com/html5/ken_burns_effect_css.htm */
$( "a[href='/wiki/index.php/File:Mlkihaveadreamcolorizedpubdom1.jpg']" ).parent().attr( "id", "Mlkihaveadreamcolorizedpubdom1" );
$( "a[href='/wiki/index.php/File:Mlkihaveadreamcolorizedpubdom1.jpg']" ).parent().attr( "id", "Mlkihaveadreamcolorizedpubdom1" );
/* Also add overflow = hidden to parent DIV */
/* Also add overflow = hidden to parent DIV  
$( "a[href='/wiki/index.php/File:Mlkihaveadreamcolorizedpubdom1.jpg']" ).parent().attr( "overflow", "hidden" );
$( "a[href='/wiki/index.php/File:Mlkihaveadreamcolorizedpubdom1.jpg']" ).parent().attr( "overflow", "hidden" ); */

Revision as of 15:16, 1 July 2022

/* Any JavaScript here will be loaded for all users on every page load. */

/* This would work if the anchor tag actually had an ID but it does not - https://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_customize_the_link-URL_of_the_site-logo_in_the_top_left_corner_of_all_pages_that_activates_when_the_site-logo_is_clicked_upon?
$("a.mw-wiki-logo").attr("href", "https://liberation-map.michaelzfreeman.org/");
$("a.mw-wiki-logo").attr("title", "Go to the master Liberation Map"); */

/* JQuery address DIV (that has class and ID) --> Remove inner HTML --> Append new anchor */
$("div.p-logo").empty();
$("div.p-logo").append( "<a href=\"https://liberation-map.michaelzfreeman.org\" title=\"Go to the master Liberation Map\"><img src=\"/wiki/Liberation-Map-Logo-Final-Small.png\" alt=\"Liberation Map\"></a>" );

/* Add ID attribute to MLK thumbnail for Ken Burns animation - https://www.kirupa.com/html5/ken_burns_effect_css.htm */
$( "a[href='/wiki/index.php/File:Mlkihaveadreamcolorizedpubdom1.jpg']" ).parent().attr( "id", "Mlkihaveadreamcolorizedpubdom1" );
/* Also add overflow = hidden to parent DIV 
$( "a[href='/wiki/index.php/File:Mlkihaveadreamcolorizedpubdom1.jpg']" ).parent().attr( "overflow", "hidden" ); */