Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Clipboard</title>
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- body {
- background-color: #7c07b4;
- }
- p {
- color: #fff;
- margin: 5px;
- font-family: 'Trebuchet MS', sans-serif;
- font-size: 60px;
- font-weight: bold;
- user-select: none;
- }
- </style>
- </head>
- <body>
- <p></p>
- <script>
- const cbd = document.querySelector('p');
- let counter = 1;
- const ds = ['500413', '4821371', '14711284', '314897520'];
- const ns = ['288142', '3109512', '28461756', '361142410'];
- let tempValor;
- window.setInterval(function () {
- let clipboarddata = window.clipboardData.getData("Text");
- if (tempValor != clipboarddata) {
- tempValor = clipboarddata;
- if (ds.indexOf(tempValor) != -1) {
- cbd.textContent = 'DS';
- } else if (ns.indexOf(tempValor) != -1) {
- cbd.textContent = 'NS';
- } else {
- cbd.textContent = '';
- }
- }
- }, 500);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement