MediaWiki: Common.js: Unterschied zwischen den Versionen
Aus Semantic CorA
(4 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','http:// | + | jQuery('img.rearrangerImage').attr('src','http://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','http:// | + | jQuery('img.timeline-copyright').attr('src','http://interlinking-pictura.semantic-cora.org/upload/Copyright-vertical.png'); |
− | jQuery('div.timeline-band-layer-inner > div > img').attr('src','http:// | + | // jQuery('div.timeline-band-layer-inner > div > img').attr('src','http://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png'); |
+ | |||
+ | jQuery('div.timeline-band-layer-inner > div > img').each(function(){jQuery(this).attr('src','http://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 22: | 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() { | jQuery(document).ready(function() { | ||
− | var $ | + | 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 31. Januar 2018, 10:16 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','http://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','http://interlinking-pictura.semantic-cora.org/upload/Copyright-vertical.png');
// jQuery('div.timeline-band-layer-inner > div > img').attr('src','http://interlinking-pictura.semantic-cora.org/upload/Dull-blue-circle.png');
jQuery('div.timeline-band-layer-inner > div > img').each(function(){jQuery(this).attr('src','http://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>