
jQuery(window).load(function ()  {
    
    //smart: actions: dbl click to copy 
    jQuery( ".oxygen-media-query-and-selector-wrapper" ).dblclick(function() {
       var val = rewsBuilder.iframeScope.currentClass;
       if (!val){val = rewsBuilder.iframeScope.component.options[rewsBuilder.iframeScope.component.active.id]['selector'];}   
       recoda.textToClipboard(val); 
       recoda.alert("copied: " + val)
   });  

   jQuery(document).on('dblclick','.ct-css-node-header.ct-node-options-active.ct-css-node-stylesheet', function() {
       rewsBuilder.doShowLeftSidebar(true);
      recoda.setPropertyPX("--sidebar-width",450);
   });
   jQuery(document).on('dblclick','.ct-dom-tree-node-anchor.ct-dom-tree-node-type-general.ct-dom-tree-name', function() {
       var def_w = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--def-sidebar-width"),10);
       rewsBuilder.doShowLeftSidebar(true);
      recoda.setPropertyPX("--sidebar-width",def_w);
   });

   
   jQuery(document.getElementById("ct-artificial-viewport").contentWindow.document).bind('click', function(event){
       if(event.shiftKey){
           recoda.executeCommand(recoda.lastCommand); 
       }
   });
   jQuery(document.getElementById("ct-artificial-viewport").contentWindow.document).bind('click', function(event){
       if(event.altKey){
           recoda.executeCommand(recoda.lastCommand); 
       }
   });
   jQuery(".oxygen-media-query-and-selector-wrapper").bind('click', function(event){
       if(event.shiftKey){
           recoda.addSelectorToCLI();
       }
   });
   jQuery(document).on('click',".custom-attributes.ng-scope", function(event){
       if(event.shiftKey){
           recoda.addAttributeToCLI();
       }
   });

});
