For example:
https://tools.wmflabs.org/magnustools/resources/js/common.js line 45
function httpsAlert ( id , b4 ) {
if ( window.location.href.match ( /^https:/ ) ) {
var url = window.location.href.replace ( /^https:/ , 'http:' ) ;
var h = '<div id="https_alert" class="alert"><strong>Caveat :</strong> Using https on this page does not work in all browsers, due to downstream http dependencies. ' ;
h += '<a href="' + url + '">Use http instead</a>.<a class="close" data-dismiss="alert" href="#">×</a></div>' ;
if ( b4 ) $('#'+id).before ( h ) ;
else $('#'+id).after ( h ) ;
$('#https_alert').alert() ;
}
}