🆗 调整界面样式,放大操作按钮,增加清空按钮
This commit is contained in:
parent
aab0134c8e
commit
5929098f0b
@ -1,3 +1,3 @@
|
||||
# temp-clipboard
|
||||
|
||||
临时粘贴板,支持文本和部分图片,由于带宽太低,目前体验不佳
|
||||
临时粘贴板,支持文本和部分图片,直接浏览器复制图片过不了referer校验,带宽如果比较低复制图片体验不佳
|
||||
|
@ -18,10 +18,11 @@
|
||||
/* 输入框 */
|
||||
.dzm-textarea {
|
||||
padding: 5px;
|
||||
border: 1px solid red;
|
||||
width: 98%;
|
||||
width: 95%;
|
||||
border: 1px solid #019aff;
|
||||
border-radius: 3px;
|
||||
position: fixed;
|
||||
height: 97%;
|
||||
}
|
||||
|
||||
/* 输入框为空时显示 placeholder */
|
||||
@ -33,14 +34,15 @@
|
||||
/* 输入框获取焦点时移除 placeholder */
|
||||
.dzm-textarea:focus:before {
|
||||
content: none;
|
||||
border: thick #019AFF;
|
||||
}
|
||||
|
||||
.textcopy {
|
||||
position: fixed;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
top: 50%;
|
||||
right: 1%;
|
||||
height: 100px;
|
||||
width: 90px;
|
||||
right: 5%;
|
||||
bottom: 270px;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
}
|
||||
|
||||
@ -48,7 +50,10 @@
|
||||
.textcopy a:hover {
|
||||
background: #01BCFF;
|
||||
margin: 5px;
|
||||
right: 10px;
|
||||
width: 60px;
|
||||
height: 40px;
|
||||
line-height: 1.3em;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
@ -68,6 +73,7 @@
|
||||
<a class="btn float-buttons waves-effect waves-button waves-float" onclick="copyText()">复制</a>
|
||||
<a class="btn float-buttons waves-effect waves-button waves-float" onclick="pasteText()">粘贴</a>
|
||||
<a class="btn float-buttons waves-effect waves-button waves-float" onclick="openUrl()">打开</a>
|
||||
<a class="btn float-buttons waves-effect waves-button waves-float" onclick="clearText()">清除</a>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
@ -175,6 +181,10 @@
|
||||
textarea.innerText = text
|
||||
})
|
||||
}
|
||||
|
||||
function clearText() {
|
||||
textarea.innerText = ""
|
||||
}
|
||||
//
|
||||
// function appendText() {
|
||||
// navigator.clipboard.readText()
|
||||
@ -184,7 +194,13 @@
|
||||
// }
|
||||
|
||||
function openUrl() {
|
||||
window.open(textarea.innerText)
|
||||
let url = textarea.innerText;
|
||||
if (url.startsWith("http:")) {
|
||||
window.open(url)
|
||||
} else {
|
||||
window.open("https://" + url)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let lastUpdate = null
|
||||
|
@ -18,10 +18,11 @@
|
||||
/* 输入框 */
|
||||
.dzm-textarea {
|
||||
padding: 5px;
|
||||
border: 1px solid red;
|
||||
width: 98%;
|
||||
width: 95%;
|
||||
border: 1px solid #019aff;
|
||||
border-radius: 3px;
|
||||
position: fixed;
|
||||
height: 97%;
|
||||
}
|
||||
|
||||
/* 输入框为空时显示 placeholder */
|
||||
@ -33,14 +34,15 @@
|
||||
/* 输入框获取焦点时移除 placeholder */
|
||||
.dzm-textarea:focus:before {
|
||||
content: none;
|
||||
border: thick #019AFF;
|
||||
}
|
||||
|
||||
.textcopy {
|
||||
position: fixed;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
top: 50%;
|
||||
right: 1%;
|
||||
height: 100px;
|
||||
width: 90px;
|
||||
right: 5%;
|
||||
bottom: 270px;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
}
|
||||
|
||||
@ -48,7 +50,10 @@
|
||||
.textcopy a:hover {
|
||||
background: #01BCFF;
|
||||
margin: 5px;
|
||||
right: 10px;
|
||||
width: 60px;
|
||||
height: 40px;
|
||||
line-height: 1.3em;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
@ -68,6 +73,7 @@
|
||||
<a class="btn float-buttons waves-effect waves-button waves-float" onclick="copyText()">复制</a>
|
||||
<a class="btn float-buttons waves-effect waves-button waves-float" onclick="pasteText()">粘贴</a>
|
||||
<a class="btn float-buttons waves-effect waves-button waves-float" onclick="openUrl()">打开</a>
|
||||
<a class="btn float-buttons waves-effect waves-button waves-float" onclick="clearText()">清除</a>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
@ -175,6 +181,10 @@
|
||||
textarea.innerText = text
|
||||
})
|
||||
}
|
||||
|
||||
function clearText() {
|
||||
textarea.innerText = ""
|
||||
}
|
||||
//
|
||||
// function appendText() {
|
||||
// navigator.clipboard.readText()
|
||||
@ -184,7 +194,13 @@
|
||||
// }
|
||||
|
||||
function openUrl() {
|
||||
window.open(textarea.innerText)
|
||||
let url = textarea.innerText;
|
||||
if (url.startsWith("http:")) {
|
||||
window.open(url)
|
||||
} else {
|
||||
window.open("https://" + url)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let lastUpdate = null
|
||||
|
Loading…
x
Reference in New Issue
Block a user