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 = {
37
37
'no-return-assign' : [ 'error' , 'except-parens' ] ,
38
38
'no-param-reassign' : [ 'error' , { props : false } ] ,
39
39
} ,
40
- globals : { ClipboardJS : 'readonly' } ,
41
40
} ,
42
41
] ,
43
42
extends : [ 'eslint:recommended' , 'airbnb-base' ] ,
Original file line number Diff line number Diff line change 26
26
"@rollup/plugin-dynamic-import-vars" : " ^1.1.0" ,
27
27
"@rollup/plugin-replace" : " ^2.3.4" ,
28
28
"autoprefixer" : " ^10.0.2" ,
29
+ "clipboard" : " ^2.0.6" ,
29
30
"mdsvex" : " ^0.8.7" ,
30
31
"postcss" : " ^8.1.7" ,
31
32
"prism-svelte" : " ^0.4.7" ,
Original file line number Diff line number Diff line change 1
1
<script >
2
+ import Clipboard from ' clipboard' ;
2
3
import { Button , Icon } from ' svelte-materialify/src' ;
3
4
4
5
export let lang = ' ' ;
5
6
function copy (node ) {
6
7
const toCopy = node .querySelector (' pre' ).textContent ;
7
- const clipboard = new ClipboardJS (node .querySelector (' .s-btn' ), {
8
+ const clipboard = new Clipboard (node .querySelector (' .s-btn' ), {
8
9
text : () => toCopy,
9
10
});
10
11
return {
Original file line number Diff line number Diff line change 51
51
<svelte:window on:resize ={checkMobile } />
52
52
53
53
<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' } />
59
56
</svelte:head >
60
57
61
58
<MaterialApp theme ={$theme }>
Original file line number Diff line number Diff line change 58
58
59
59
gtag ( 'config' , 'UA-156679564-3' ) ;
60
60
</ script >
61
- < script
62
- defer
63
- src ="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js "
64
- > </ script >
65
61
66
62
<!-- Sapper creates a <script> tag containing `src/client.js`
67
63
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:
3410
3410
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48"
3411
3411
integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==
3412
3412
3413
- clipboard@^2.0.0:
3413
+ clipboard@^2.0.0, clipboard@^2.0.6 :
3414
3414
version "2.0.6"
3415
3415
resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.6.tgz#52921296eec0fdf77ead1749421b21c968647376"
3416
3416
integrity sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==
You can’t perform that action at this time.
0 commit comments