🎨 Reformate le code pour lisibilité
This commit is contained in:
parent
55c3db0165
commit
0a2da9f512
|
@ -1,57 +1,51 @@
|
|||
|
||||
// remap jQuery to $
|
||||
(function($){
|
||||
(function ($) {
|
||||
|
||||
|
||||
$('div.french').hide();
|
||||
$('#main > div > div').hide();
|
||||
|
||||
$('#en-lang').click(function(){
|
||||
$('.french').hide();
|
||||
$('.english').show();
|
||||
});
|
||||
$('div.french').hide();
|
||||
$('#main > div > div').hide();
|
||||
|
||||
$('#fr-lang').click(function(){
|
||||
$('.french').show();
|
||||
$('.english').hide();
|
||||
});
|
||||
$('#en-lang').click(function () {
|
||||
$('.french').hide();
|
||||
$('.english').show();
|
||||
});
|
||||
|
||||
$('h2').click(function(){
|
||||
$('h2').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$('#main > div > div').slideUp();
|
||||
$(this).next('div').slideDown();
|
||||
});
|
||||
$('#fr-lang').click(function () {
|
||||
$('.french').show();
|
||||
$('.english').hide();
|
||||
});
|
||||
|
||||
$('hr').hide();
|
||||
|
||||
|
||||
$('h2').click(function () {
|
||||
$('h2').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$('#main > div > div').slideUp();
|
||||
$(this).next('div').slideDown();
|
||||
});
|
||||
|
||||
$('hr').hide();
|
||||
|
||||
|
||||
})(window.jQuery);
|
||||
|
||||
|
||||
|
||||
// usage: log('inside coolFunc',this,arguments);
|
||||
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
|
||||
window.log = function(){
|
||||
log.history = log.history || []; // store logs to an array for reference
|
||||
log.history.push(arguments);
|
||||
if(this.console){
|
||||
console.log( Array.prototype.slice.call(arguments) );
|
||||
}
|
||||
window.log = function () {
|
||||
log.history = log.history || []; // store logs to an array for reference
|
||||
log.history.push(arguments);
|
||||
if (this.console) {
|
||||
console.log(Array.prototype.slice.call(arguments));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
// catch all document.write() calls
|
||||
(function(doc){
|
||||
var write = doc.write;
|
||||
doc.write = function(q){
|
||||
log('document.write(): ',arguments);
|
||||
if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments);
|
||||
};
|
||||
(function (doc) {
|
||||
var write = doc.write;
|
||||
doc.write = function (q) {
|
||||
log('document.write(): ', arguments);
|
||||
if (/docwriteregexwhitelist/.test(q)) write.apply(doc, arguments);
|
||||
};
|
||||
})(document);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue