|
|
发表于 2025-9-23 20:38:20
|
显示全部楼层
今天看到新闻说 DeepSeek升级了,更新至 DeepSeek-V3.1-Terminus 版本 ,用你这个需求试了下效果,结果还不错,但是css按钮样式有点普通。
js小书签:
- javascript:(function(){ var overlay = document.createElement('div'); overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);z-index:9999;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;padding-top:10vh;'; var textarea = document.createElement('textarea'); textarea.value = window.location.href; textarea.style.cssText = 'width:70%;height:100px;resize:both;margin-bottom:20px;padding:10px;font-size:16px;'; var buttonContainer = document.createElement('div'); buttonContainer.style.cssText = 'display:flex;gap:50px;'; var copyBtn = document.createElement('button'); copyBtn.textContent = '复制'; copyBtn.style.cssText = 'padding:10px 20px;font-size:16px;cursor:pointer;'; var openBtn = document.createElement('button'); openBtn.textContent = '打开'; openBtn.style.cssText = 'padding:10px 20px;font-size:16px;cursor:pointer;'; function removeOverlay() { document.body.removeChild(overlay); } copyBtn.onclick = function() { textarea.select(); document.execCommand('copy'); removeOverlay(); }; openBtn.onclick = function() { window.open(textarea.value, '_blank'); removeOverlay(); }; overlay.onclick = function(e) { if (e.target === overlay) { removeOverlay(); } }; buttonContainer.appendChild(copyBtn); buttonContainer.appendChild(openBtn); overlay.appendChild(textarea); overlay.appendChild(buttonContainer); document.body.appendChild(overlay);})();
复制代码
|
|