| Server IP : 213.186.33.4 / Your IP : 216.73.216.146 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www2/wp-content/plugins/jetpack/modules/custom-css/custom-css/js/ |
Upload File : |
/* jshint onevar: false, smarttabs: true */
/* global postboxes, addLoadEvent */
( function ( $ ) {
var safe, win, safecssResize, safecssInit;
safecssResize = function () {
safe.height( win.height() - safe.offset().top - 250 );
};
safecssInit = function() {
safe = $( '#safecss' );
win = $( window );
postboxes.add_postbox_toggles( 'editcss' );
safecssResize();
// Bound on a parent to ensure that this click event executes last.
$( '#safecssform' ).on( 'click', '#preview', function ( e ) {
e.preventDefault();
document.forms.safecssform.target = 'csspreview';
document.forms.safecssform.action.value = 'preview';
document.forms.safecssform.submit();
document.forms.safecssform.target = '';
document.forms.safecssform.action.value = 'save';
} );
};
window.onresize = safecssResize;
addLoadEvent( safecssInit );
} )( jQuery );
jQuery( function ( $ ) {
$( '.edit-preprocessor' ).bind( 'click', function ( e ) {
e.preventDefault();
$( '#preprocessor-select' ).slideDown();
$( this ).hide();
} );
$( '.cancel-preprocessor' ).bind( 'click', function ( e ) {
e.preventDefault();
$( '#preprocessor-select' ).slideUp( function () {
$( '.edit-preprocessor' ).show();
$( '#preprocessor_choices' ).val( $( '#custom_css_preprocessor' ).val() );
} );
} );
$( '.save-preprocessor' ).bind( 'click', function ( e ) {
e.preventDefault();
$( '#preprocessor-select' ).slideUp();
$( '#preprocessor-display' ).text( $( '#preprocessor_choices option:selected' ).text() );
$( '#custom_css_preprocessor' ).val( $( '#preprocessor_choices' ).val() ).change();
$( '.edit-preprocessor' ).show();
} );
$( '.edit-css-mode' ).bind( 'click', function ( e ) {
e.preventDefault();
$( '#css-mode-select' ).slideDown();
$( this ).hide();
} );
$( '.cancel-css-mode' ).bind( 'click', function ( e ) {
e.preventDefault();
$( '#css-mode-select' ).slideUp( function () {
$( '.edit-css-mode' ).show();
$( 'input[name=add_to_existing_display][value=' + $( '#add_to_existing' ).val() + ']' ).attr( 'checked', true );
} );
} );
$( '.save-css-mode' ).bind( 'click', function ( e ) {
e.preventDefault();
$( '#css-mode-select' ).slideUp();
$( '#css-mode-display' ).text( $( 'input[name=add_to_existing_display]:checked' ).val() == 'true' ? 'Add-on' : 'Replacement' ); // jshint ignore:line
$( '#add_to_existing' ).val( $( 'input[name=add_to_existing_display]:checked' ).val() );
$( '.edit-css-mode' ).show();
} );
} );