X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FResources%2Fstatic%2Fthemes%2F_global%2Findex.js;h=66ac063bc97961ad4bac4d9629b62ad41a372979;hb=66fa0c26ab74467645e2cc63a4f48ef82e3f5748;hp=9ad96fc020487d888aabd8f330a7351c1767b529;hpb=ff8fe22f2e00f91c08efb161e4de52bc4b401880;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js index 9ad96fc0..66ac063b 100644 --- a/app/Resources/static/themes/_global/index.js +++ b/app/Resources/static/themes/_global/index.js @@ -4,6 +4,8 @@ import $ from 'jquery'; /* Annotations */ import annotator from 'annotator'; +import ClipboardJS from 'clipboard'; + /* Fonts */ import 'material-design-icons-iconfont/dist/material-design-icons.css'; import 'lato-font/css/lato-font.css'; @@ -107,4 +109,12 @@ $(document).ready(() => { $('#user_emailTwoFactor').on('change', () => { $('#user_googleTwoFactor').prop('checked', false); }); + + // handle copy to clipboard for developer stuff + const clipboard = new ClipboardJS('.btn'); + clipboard.on('success', (e) => { + console.info(e.text); + + e.clearSelection(); + }); });