Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- .parent{
- display: flex;
- position: relative;
- font-size: 12px;
- font-weight: bold;
- }
- .left{
- border: 2px solid;
- border-right:none;
- border-radius:10px;
- border-bottom-right-radius:0;
- border-top-right-radius:0;
- padding: 5px 10px;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .right{
- border: 2px solid;
- cursor:pointer;
- border-radius:10px;
- border-left:none;
- border-bottom-left-radius:0;
- border-top-left-radius:0;
- padding: 5px 10px;
- background-color: #FFA500;
- }
- </style>
- <script>
- document.addEventListener("DOMContentLoaded", function() {
- const existCondition = setInterval(function() {
- if ($('#copy-page').length) {
- const text = document.querySelector(".left");
- const button = document.querySelector(".right");
- function copyText() {
- navigator.clipboard.writeText(text.innerText).then((t) => {});
- }
- button.addEventListener("click", copyText);
- clearInterval(existCondition);
- }
- }, 100);
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement