[測試] bbsjs screen message已刪文
test html screen message
<html>
<head>
<meta charset="UTF-8">
<!--
# sm.html
# Copyright (C) 2006 - 2010 Joachim Breitner
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
-->
<title>Screen message</title>
<style type="text/css">
#textarea {
position:absolute;
top:0px;
left:0px;
width:100%;
height:100%;
font-family: monospace, sans;
padding:0px;
margin:0px;
border:0px;
text-align:center;
overflow:hidden;
resize:none;
/*
This used to be here. Not sure why, but eventually,
it broke Firefox (newlines not wrapping lines)
white-space:nowrap;
*/
}
/* disable focus border at Chrome */
#textarea:focus {
outline: none;
}
#test {
position:absolute;
visibility:hidden;
top:0px;
left:0px;
font-size:30px;
white-space:pre;
font-family: monospace, sans;
border:0px;
padding:0.1em;
margin:0px;
}
#about {
position:absolute;
width:20em;
top:30px;
right:30px;
background-color:gray;
padding:1em;
}
</style>
<script type="text/javascript">
opacity = 100;
function adjust() {
ta = document.getElementById("textarea");
test = document.getElementById("test");
test.textContent=ta.value;
// Otherwise, the newline would not be counted.
if (ta.value[ta.value.length-1] == "\n") {
test.innerHTML += '.';
}
ratioX = (window.innerWidth) / test.offsetWidth;
ratioY = (window.innerHeight) / test.offsetHeight;
ratio = Math.min(ratioX,ratioY);
fontSize = Math.floor(30 * ratio) + "px"
ta.style.fontSize = fontSize;
newHeight = Math.ceil(test.offsetHeight * ratio);
ta.style.paddingTop = Math.floor(
(window.innerHeight - newHeight)/2) +"px";
ta.style.paddingBottom = Math.floor(
(window.innerHeight - newHeight)/2) +"px";
newWidth = Math.ceil(test.offsetWidth * ratio);
ta.style.paddingLeft = Math.max(0,Math.floor(
(window.innerWidth - newWidth)/2)) + "px";
ta.style.paddingRight = Math.max(0,Math.floor(
(window.innerWidth - newWidth)/2)) + "px";
href = "#t=" + encodeURIComponent(ta.value);
if (ta.style.color) {
href += ";f=" + encodeURIComponent(ta.style.color);
}
if (ta.style.backgroundColor) {
href += ";b=" + encodeURIComponent(ta.style.backgroundColor);
}
window.location.hash = href;
}
function showBox() {
opacity = 100;
window.clearTimeout(timeout);
setOpacity();
}
function fadeOut() {
opacity *= 0.985;
if (opacity > 1) {
timeout = window.setTimeout("fadeOut()",20);
} else {
opacity = 0;
}
setOpacity();
}
function setOpacity() {
about = document.getElementById("about");
about.style.opacity = opacity/100;
about.style.filter = "alpha(opacity="+Math.round(opacity)+")";
}
function parseHash() {
ta = document.getElementById("textarea");
ta.focus();
var queryString = {};
window.location.href.replace(
new RegExp("([^?=&;#]+)(=([^&;]*))", "g"),
function($0, $1, $2, $3) {queryString[$1] =
decodeURIComponent($3); }
);
if (queryString['t']) {
ta.value = queryString['t'];
}
if (queryString['f']) {
ta.style.color = queryString['f'];
}
if (queryString['b']) {
ta.style.backgroundColor = queryString['b'];
}
adjust();
timeout = window.setTimeout("fadeOut();",1000);
setOpacity();
}
function init() {
if (window.navigator.mozApps) {
document.getElementById("firefox").style.display = "block";
}
parseHash();
}
</script>
<meta name="viewport" content="width=device-width, initial-scale=1,
user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
</head>
<body onload="init()" onhashchange="parseHash()" onresize="adjust()">
<textarea id="textarea" onKeyUp="adjust()" onpaste="adjust()"
oninput="adjust()">:-)</textarea>
<span id="test"></span>
<div id="about" onMouseOver="showBox()" onMouseOut="fadeOut()">
<p>
This is an online-version of the program <strong>screen-message</strong> for
Linux.
</p>
<p id="firefox" style="display:none">
You can <a href="#"
onclick="window.navigator.mozApps.install('install" rel="nofollow">http://sm.nomeata.de/sm.webapp')">install
it as a FireFox app</a>.
</p>
<p>
For more information about the original program, see what <a
href="Deb-a-Day" rel="nofollow">http://debaday.debian.net/2007/07/18/screen-message-use-your-screen-to-communicate/">Deb-a-Day</a>
writes about it. You can download it from <a
href="Debian" rel="nofollow">http://packages.debian.org/sid/sm">Debian</a> or <a
href="fetch" rel="nofollow">http://darcs.nomeata.de/screen-message/">fetch the sourcecode</a>.
</p>
<p>
<strong>screen-message</strong> was created by <a
href="Joachim" rel="nofollow">http://www.joachim-breitner.de/">Joachim Breitner</a>.
If you like it, then <a href="http://flattr.com/thing/330186/screen-message"
target="_blank">flattr this</a>.
</p>
</div>
</body>
</html>
--
sent from mySQL.
--
※ 發信站: 夢之大地 (ccns.cc), 來自: 140.116.249.140
※ 文章網址: telnet://ccns.cc/
推
02/30 22:66,
02/30 22:66
推
02/30 28:19,
02/30 28:19
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.127.95 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Test/M.1576152072.A.659.html
※ 編輯: Gold740716 (140.113.127.95 臺灣), 12/12/2019 20:10:04
※ 編輯: Gold740716 (140.113.127.95 臺灣), 12/12/2019 20:11:04
※ 編輯: Gold740716 (140.113.127.95 臺灣), 12/12/2019 20:13:40
※ 編輯: Gold740716 (140.113.127.95 臺灣), 12/12/2019 20:20:26
※ 編輯: Gold740716 (140.113.127.95 臺灣), 12/12/2019 22:01:49