MediaWiki: Common.js: Unterschied zwischen den Versionen
Aus Interlinking_Pictura
(22 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
/* Das folgende JavaScript wird für alle Benutzer geladen. */ | /* Das folgende JavaScript wird für alle Benutzer geladen. */ | ||
− | <source lang="javascript"> | + | //<source lang="javascript"> |
// This JavaScript will be loaded for all users on every page load. | // This JavaScript will be loaded for all users on every page load. | ||
// Except for additions at the end, imported from en.wikipedia.org and modified (parts removed). | // Except for additions at the end, imported from en.wikipedia.org and modified (parts removed). | ||
// for authors see http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&action=history | // for authors see http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&action=history | ||
+ | |||
+ | // Alias $j to jQuery for backwards compatibility | ||
+ | window.$ = jQuery; | ||
+ | // Attach to window and globally alias | ||
+ | window.mw = window.mediaWiki = mw; | ||
+ | |||
+ | jQuery.fn.ignore = function(sel){ | ||
+ | return this.clone().find(sel||">*").remove().end(); | ||
+ | }; | ||
$(window).load(function() { | $(window).load(function() { | ||
+ | |||
+ | jQuery('#firstHeading > span').html(); | ||
+ | var myDiv = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title'); | ||
+ | |||
+ | if ( myDiv.length){ | ||
+ | //you can now reuse $myDiv here, without having to select it again. | ||
+ | var val = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title ').ignore("span").html().trim(); | ||
+ | jQuery('#firstHeading > span').html(val); | ||
+ | } | ||
// I changed rearranger image(by Adrian) | // I changed rearranger image(by Adrian) | ||
− | jQuery('img.rearrangerImage').attr('src',' | + | jQuery('img.rearrangerImage').attr('src','https://interlinking-pictura.semantic-cora.org/upload/rearranger.png'); |
// I changed dull-blue-circle.png (from blue to orange) (by Adrian) | // I changed dull-blue-circle.png (from blue to orange) (by Adrian) | ||
− | jQuery('img.timeline-copyright').attr('src',' | + | jQuery('img.timeline-copyright').attr('src','https://interlinking-pictura.semantic-cora.org/upload/Copyright-vertical.png'); |
− | // jQuery('div.timeline-band-layer-inner > div > img').attr('src',' | + | // jQuery('div.timeline-band-layer-inner > div > img').attr('src','https://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png'); |
− | jQuery('div.timeline-band-layer-inner > div > img').each(function(){jQuery(this).attr('src',' | + | jQuery('div.timeline-band-layer-inner > div > img').each(function(){jQuery(this).attr('src','https://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png');}); |
//I changed the slim bottom lines (in fact it is border color left) from blue to orange (by Adrian) | //I changed the slim bottom lines (in fact it is border color left) from blue to orange (by Adrian) | ||
Zeile 23: | Zeile 41: | ||
jQuery(this).css('border-left-color','rgb(247,102,0)'); | jQuery(this).css('border-left-color','rgb(247,102,0)'); | ||
} | } | ||
+ | }); | ||
+ | // alert( jQuery('#firstHeading > span').html()); | ||
+ | }); | ||
+ | jQuery(document).ready(function() { | ||
+ | var $ = jQuery.noConflict; | ||
+ | var myDiv = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title'); | ||
+ | |||
+ | if ( myDiv.length){ | ||
+ | var val = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title ').ignore("span").html().trim(); | ||
+ | jQuery('#firstHeading > span').html(val); | ||
+ | } | ||
+ | |||
}); | }); | ||
− | </source> | + | //</source> |
Aktuelle Version vom 13. September 2018, 11:29 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */ //<source lang="javascript"> // This JavaScript will be loaded for all users on every page load. // Except for additions at the end, imported from en.wikipedia.org and modified (parts removed). // for authors see http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&action=history // Alias $j to jQuery for backwards compatibility window.$ = jQuery; // Attach to window and globally alias window.mw = window.mediaWiki = mw; jQuery.fn.ignore = function(sel){ return this.clone().find(sel||">*").remove().end(); }; $(window).load(function() { jQuery('#firstHeading > span').html(); var myDiv = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title'); if ( myDiv.length){ //you can now reuse $myDiv here, without having to select it again. var val = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title ').ignore("span").html().trim(); jQuery('#firstHeading > span').html(val); } // I changed rearranger image(by Adrian) jQuery('img.rearrangerImage').attr('src','https://interlinking-pictura.semantic-cora.org/upload/rearranger.png'); // I changed dull-blue-circle.png (from blue to orange) (by Adrian) jQuery('img.timeline-copyright').attr('src','https://interlinking-pictura.semantic-cora.org/upload/Copyright-vertical.png'); // jQuery('div.timeline-band-layer-inner > div > img').attr('src','https://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png'); jQuery('div.timeline-band-layer-inner > div > img').each(function(){jQuery(this).attr('src','https://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png');}); //I changed the slim bottom lines (in fact it is border color left) from blue to orange (by Adrian) jQuery('div.timeline-band-layer-inner > div').each(function(){ if(jQuery(this).css('border-left-color') == 'rgb(88, 160, 220)') { jQuery(this).css('border-left-color','rgb(247,102,0)'); } }); // alert( jQuery('#firstHeading > span').html()); }); jQuery(document).ready(function() { var $ = jQuery.noConflict; var myDiv = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title'); if ( myDiv.length){ var val = jQuery('.col-lg-5 >.panel-primary > .panel-heading>.panel-title ').ignore("span").html().trim(); jQuery('#firstHeading > span').html(val); } }); //</source>