This repository was archived by the owner on Sep 26, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +6
-12
lines changed Expand file tree Collapse file tree 6 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ module.exports = {
3737 'no-return-assign' : [ 'error' , 'except-parens' ] ,
3838 'no-param-reassign' : [ 'error' , { props : false } ] ,
3939 } ,
40- globals : { ClipboardJS : 'readonly' } ,
4140 } ,
4241 ] ,
4342 extends : [ 'eslint:recommended' , 'airbnb-base' ] ,
Original file line number Diff line number Diff line change 2626 "@rollup/plugin-dynamic-import-vars" : " ^1.1.0" ,
2727 "@rollup/plugin-replace" : " ^2.3.4" ,
2828 "autoprefixer" : " ^10.0.2" ,
29+ "clipboard" : " ^2.0.6" ,
2930 "mdsvex" : " ^0.8.7" ,
3031 "postcss" : " ^8.1.7" ,
3132 "prism-svelte" : " ^0.4.7" ,
Original file line number Diff line number Diff line change 11<script >
2+ import Clipboard from ' clipboard' ;
23 import { Button , Icon } from ' svelte-materialify/src' ;
34
45 export let lang = ' ' ;
56 function copy (node ) {
67 const toCopy = node .querySelector (' pre' ).textContent ;
7- const clipboard = new ClipboardJS (node .querySelector (' .s-btn' ), {
8+ const clipboard = new Clipboard (node .querySelector (' .s-btn' ), {
89 text : () => toCopy,
910 });
1011 return {
Original file line number Diff line number Diff line change 5151<svelte:window on:resize ={checkMobile } />
5252
5353<svelte:head >
54- {#if $theme === ' light' }
55- <link rel =" stylesheet" href =" prism/material-light.css" />
56- {:else }
57- <link rel =" stylesheet" href =" prism/material-dark.css" />
58- {/if }
54+ <link rel ="stylesheet" href ="prism/material-light.css" disabled ={$theme === ' dark' } />
55+ <link rel ="stylesheet" href ="prism/material-dark.css" disabled ={$theme === ' light' } />
5956</svelte:head >
6057
6158<MaterialApp theme ={$theme }>
Original file line number Diff line number Diff line change 5858
5959 gtag ( 'config' , 'UA-156679564-3' ) ;
6060 </ script >
61- < script
62- defer
63- src ="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js "
64- > </ script >
6561
6662 <!-- Sapper creates a <script> tag containing `src/client.js`
6763 and anything else it needs to hydrate the app and
Original file line number Diff line number Diff line change @@ -3410,7 +3410,7 @@ cli-width@^2.0.0:
34103410 resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48"
34113411 integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==
34123412
3413- clipboard@^2.0.0:
3413+ clipboard@^2.0.0, clipboard@^2.0.6 :
34143414 version "2.0.6"
34153415 resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.6.tgz#52921296eec0fdf77ead1749421b21c968647376"
34163416 integrity sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==
You can’t perform that action at this time.
0 commit comments