I forgot the dependecy used:
  <script type="text/javascript"
          
src="http://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.4.2/clipboard.min.js";></script>


On Wednesday, April 8, 2020 at 7:24:20 PM UTC+2, Greg Trzeciak wrote:
>
> Found in an old file of mine:
>  
> <script type="text/javascript">
>   'use strict';
>   var codeblock = document.getElementsByTagName('blockquote');
>   for (var i = 0;i<codeblock.length; i++) {
>     var isCode = codeblock[i].className.indexOf('SCodeFlow');
>     if ( isCode === 0 ) {
>        var button = document.createElement('button');
>                     button.className = 'copy-button';
>                     button.textContent = 'Copy';
>                     codeblock[i].appendChild(button);
>     }
>   }
>   var copyCode = new Clipboard('.copy-button', {
>     target: function(trigger) {
>         return trigger.previousElementSibling;
>     }
>   });
>   
> </script>
>
>
>
> <style type="text/css">
> .SCodeFlow { position:relative; }
>   .copy-button {
>         opacity: 0.2;
>         -moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
>         -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
>         box-shadow:inset 0px 1px 0px 0px #ffffff;
>         background-color:transparent;
>         -moz-border-radius:6px;
>         -webkit-border-radius:6px;
>         border-radius:6px;
>         border:1px solid #dcdcdc;
>         display:inline-block;
>         cursor:pointer;
>         color:#666666;
>         font-family:Miso;
>         font-size:20px;
>         font-weight:bold;
>         padding:4px 18px;
>         text-decoration:none;
>         text-shadow:0px 1px 0px #ffffff;
>         position:absolute;
>         top:0;
>         right:0;
>   }
>   /*.SCodeFlow:hover > .copy-button:hover {  */
>   .copy-button:hover {
>         opacity: 0.7;
>         -moz-transition-property: opacity;
>         -webkit-transition-property: opacity;
>         transition-property: opacity;
>         -moz-transition-duration: 0.15s;
>         -webkit-transition-duration: 0.15s;
>         transition-duration: 0.15s;
>         /*background-color:transparent;*/
>   }
>   /*
>   .copy-button:active {
>         position:relative;
>         top:1px;
>   }
>   */
>   
> </style>
>
>
>
> On Wednesday, April 8, 2020 at 6:54:37 PM UTC+2, Stephen De Gabrielle 
> wrote:
>>
>> That’s a good suggestion! Do you know the relevant JavaScript we can try 
>> it out with. Might be an easy PR. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/36e70af0-b76a-4cfc-b4f5-d9c000eaed2b%40googlegroups.com.

Reply via email to