summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2019-02-12 18:53:12 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-02-12 18:53:12 +0800
commitd7b95f0d040deb1b34af31c7c8e2f66c1e37686e (patch)
tree282d9b605c70cedee96224f6625780a8d8a2f5ce /index.html
parentec9d9b4da39e6c74b8514bfaf623ed7ac310d128 (diff)
downloadweb-d7b95f0d040deb1b34af31c7c8e2f66c1e37686e.tar.xz
First update.
Diffstat (limited to 'index.html')
-rw-r--r--index.html147
1 files changed, 74 insertions, 73 deletions
diff --git a/index.html b/index.html
index de4abc3..e9e6098 100644
--- a/index.html
+++ b/index.html
@@ -17,11 +17,15 @@
<link rel="stylesheet" type="text/css" href="theme2b.css" id="theme2b">
<link rel="stylesheet" type="text/css" href="theme3a.css" id="theme3a">
<link rel="stylesheet" type="text/css" href="theme3b.css" id="theme3b">
+<script src="https://www.google.com/recaptcha/api.js?render=6LdCZ5AUAAAAAPL9Fooi8Zh3m0VTepvpNR9S4G5L"></script>
<style>
reduced{font-size:75%;}
#msgform{width:50%;margin:auto;}
@media (max-width:768px)
{#msgform{width:auto;margin:1em;}}
+ .grecaptcha-badge{
+ visibility: collapse !important;
+ }
</style>
</head>
<!--
@@ -32,7 +36,7 @@ Contents are licensed under the CC BY-SA 4.0 license.
<body onload="swonload();">
<script type="text/javascript" src="panel.js"></script>
<script type="text/javascript">
-var rcaptcha=null;
+var recaptcha=null;
function changeImage(a,b){
document.getElementById(a).style.display='inline';
document.getElementById(b).style.display='none';
@@ -98,15 +102,11 @@ function toggleblkdisplay(e){
}
function contsw(cont){
var lst=document.getElementById('content').getElementsByClassName('block');
+ if(recaptcha&&typeof(recaptcha.execute)=='function')
+ recaptcha.execute('6LdCZ5AUAAAAAPL9Fooi8Zh3m0VTepvpNR9S4G5L',{action:cont}).then(function(t){});
for(var i=0;i<lst.length;++i)
lst.item(i).style.display='none';
if(document.getElementById(cont)===null)cont='main';
- if(cont=='guestbook'&&rcaptcha===null)
- {
- rcaptcha=document.createElement('script');
- rcaptcha.setAttribute('src','https://www.google.com/recaptcha/api.js');
- document.body.appendChild(rcaptcha);
- }
document.getElementById(cont).style.display='block';
lst=document.getElementById('panellist').getElementsByTagName('a');
for(var i=0;i<lst.length;++i)
@@ -121,22 +121,14 @@ function swonload(){
else unsetevents();
}
window.onresize();
+ if(grecaptcha)
+ grecaptcha.ready(function(){recaptcha=grecaptcha;});
loadTheme();
if(!location.hash.length)contsw('main');
else contsw(location.hash.substr(1));
var unsupportedpf=['Macintosh','MacIntel','MacPPC','Mac68K','iPhone','iPad','iPod'];
if(unsupportedpf.indexOf(window.navigator.platform)!==-1)
document.getElementById('appleouter').style.display='block';
- /*var h=new XMLHttpRequest();
- h.open("GET","/cgi/4or6.cgi?"+(new Date()).getTime());
- h.send();
- h.onload=function()
- {
- if(Number(h.responseText)==(6))
- document.getElementById("v6").style.display="block";
- else
- document.getElementById("v4").style.display="block";
- }*/
}
</script>
<div id="panel" class="TText">
@@ -150,9 +142,6 @@ function swonload(){
<li><a id="linkslk" href="#links" onclick="contsw('links');">Links</a></li>
<li><a href="javascript:showthemesw()">Themes</a></li>
</ul>
- <!--<div class="themesw">
- theme:<br><a href="./" onclick="changeTheme('day')"><img src="day.svg" alt="day"></a>&nbsp;<a href="./" onclick="changeTheme('night')"><img src="night.svg" alt="night"></a>&nbsp;<a href="./" onclick="changeTheme('auto')"><img src="auto.svg" alt="auto"></a>
- </div>-->
</div>
<div id="content" class="TText">
<div class="block" id="main">
@@ -166,15 +155,13 @@ function swonload(){
<p>
Have fun exploring!
</p>
- <!--<p>
- (If you see Koishi instead of Yuyuko, you are reaching this site via IPv6.)
- </p>-->
<p id="appleouter" style="display:none;">
<b>Please read [<a href="https://stallman.org/apple.html" rel="external" target="_blank" onclick="document.getElementById('apple').style.display='block';">this</a>] in case of any trouble, Your Excellency.</b>
<div id="apple" class="block" style="display:none;"><p>
The owner of this site doesn't have any Apple devices that can go online so you may experience major problems browsing this site. If you consider this unacceptable, you may donate me an Apple device. Please mail your generous donation to <code>/dev/null</code>.
</p></div>
</p>
+ <p style="font-size:75%;text-indent:2.67em;">This site uses reCAPTCHA for traffic analysis. <a href="https://policies.google.com/terms">Terms</a> and <a href="https://policies.google.com/privacy">privacy policy</a> of Google may apply.</p>
</div>
<div class="block" id="projects">
<h2>Projects</h2><hr>
@@ -323,7 +310,7 @@ function swonload(){
</li>
<li>Chris' Timidity Player (2012)
<reduced>
- <a id="timidityplyr" href="./inactive/TimidityPlayer.tar.xz">[archive]</a>
+ <a id="timidityplyr" href="//filestorage.chrisoft.org/inactive/TimidityPlayer.tar.xz">[archive]</a>
<a href="javascript:toggleblkdisplay('tmidp-desc')">[short desc.]</a>
</reduced>
<div class="block" id="tmidp-desc">
@@ -333,7 +320,7 @@ function swonload(){
</li>
<li>Simple Tester for OI (2012)
<reduced>
- <a href="./inactive/Tester.tar.xz">[archive]</a>
+ <a href="//filestorage.chrisoft.org/inactive/Tester.tar.xz">[archive]</a>
<a href="javascript:toggleblkdisplay('testr-desc')">[short desc.]</a>
</reduced>
<div class="block" id="testr-desc">
@@ -361,7 +348,7 @@ function swonload(){
</li>
<li>Cross Noodles (Virtools) (2012)
<reduced>
- <a href="./Cross_Noodles.html">[details]</a>
+ <a href="//cgit.chrisoft.org/oddities.git/tree/Virtools/Cross_Noodles.cmo">[details]</a>
<a href="javascript:toggleblkdisplay('crxnd-desc')">[short desc.]</a>
</reduced>
<div class="block" id="crxnd-desc">
@@ -370,7 +357,7 @@ function swonload(){
</li>
<li>Compiz 0.9.7.99 (2012-2016)
<reduced>
- <a href="./data/compiz0.9.7.9.tar.xz">[archive]</a>
+ <a href="//filestorage.chrisoft.org/inactive/compiz0.9.7.9.tar.xz">[archive]</a>
<a href="javascript:toggleblkdisplay('cmpz-desc')">[short desc.]</a>
</reduced>
<div class="block" id="cmpz-desc">
@@ -381,7 +368,6 @@ function swonload(){
</li>
<li>Minesweeper in HGE (2012)
<reduced>
- <a href="./data/minesweeper.zip">[archive]</a>
<a href="javascript:toggleblkdisplay('mswp-desc')">[short desc.]</a>
</reduced>
<div class="block" id="mswp-desc">
@@ -390,7 +376,7 @@ function swonload(){
</li>
<li>Desktop (2012)
<reduced>
- <a href="./inactive/Desktop.tar.xz">[archive]</a>
+ <a href="//filestorage.chrisoft.org/inactive/Desktop.tar.xz">[archive]</a>
<a href="javascript:toggleblkdisplay('dskt-desc')">[short desc.]</a>
</reduced>
<div class="block" id="dskt-desc">
@@ -469,9 +455,9 @@ function swonload(){
<p>
Music arranged and some, composed, by me.
</p>
- <h3><a href="./libs/pictures">Picture Library</a></h3>
+ <h3><a href="./libs/pictures/osunix-logo_sq_thicken.png">Picture Library</a></h3>
<p>
- My collection of pictures from the Internet.
+ Nothin'.
</p>
<h3><a href="//cgit.chrisoft.org">Code Library</a></h3>
<p>
@@ -481,6 +467,7 @@ function swonload(){
<div class="block" id="guestbook">
<h2>Leave a Message</h2><hr>
<p style="font-size:75%;">
+ All times are in CST (UTC+8).
Messages are <b>not</b> censored
(except messages for testing, which would be deleted
shortly after posting; advertising is also prohibited).
@@ -493,57 +480,79 @@ function swonload(){
<div id="commentdiv">
</div>
<script>
- function verify()
+ function gb_send()
{
- if(document.getElementById("mcontent").value.length+document.getElementById("mname").value.length>16300)return;
+ if(document.getElementById("mcontent").value.length+document.getElementById("mname").value.length>16300)
+ alert('super duper secure client side security');
+ document.getElementById('button_send').innerHTML='...';
+ document.getElementById('button_send').disabled=true;
try
{
- if(grecaptcha.getResponse().length===0)
- document.getElementById("ann").style.display="inline-block";
- else document.getElementById("msgform").submit();
+ recaptcha.execute('6LdCZ5AUAAAAAPL9Fooi8Zh3m0VTepvpNR9S4G5L',{action:'guestbook_newentry'}).then(
+ function(t){
+ var h=new XMLHttpRequest();
+ var f={};
+ f.mname=encodeURIComponent(document.getElementById('mname').value);
+ f.mcontent=encodeURIComponent(document.getElementById('mcontent').value);
+ f.gr_ret=t;
+ h.open('POST','/cgi/gb_newentry.cgi');
+ h.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
+ h.send(JSON.stringify(f));
+ h.onerror=function(){
+ alert('You broke something, or something broke itself...');
+ document.getElementById('button_send').innerHTML='Leave the message!';
+ document.getElementById('button_send').disabled=false;
+ };
+ h.onload=function(){
+ gb_load();
+ document.getElementById('button_send').innerHTML='Leave the message!';
+ document.getElementById('button_send').disabled=false;
+ };
+ }
+ );
}
catch(e){return;}
}
- var h=new XMLHttpRequest();
- h.open("GET","/leave-a-message/messages.json?"+(new Date()).getTime());
- h.send();
- h.onload=function()
+ function gb_load()
{
- var r=h.responseText.split('\n');
- for(var i=r.length-1;i>=0;--i)
+ while(document.getElementById('commentdiv').firstChild)
+ document.getElementById('commentdiv').removeChild(document.getElementById('commentdiv').firstChild);
+ var h=new XMLHttpRequest();
+ h.open("GET","/leave-a-message/messages?"+(new Date()).getTime());
+ h.send();
+ h.onload=function()
{
- r[i].trim();
- if(!r[i])continue;
- var o=JSON.parse(r[i]);
- if(o.cont===undefined||o.cont===null)
- continue;
- var e=document.createElement('div');
- e.classList.add('comment');
- var p=document.createElement('div');
- p.style.padding='0.5em 0 0.5em 0.5em';
- p.innerHTML=o.cont;
- var t=document.createElement('div');
- t.classList.add('author');
- if(!o.author.length)o.author='Anonymous';
- t.innerHTML=o.author+" at "+o.time;
- e.appendChild(p);
- e.appendChild(t);
- document.getElementById('commentdiv').appendChild(e);
+ var ro=JSON.parse(h.responseText.split('\n'))
+ for(var i=ro.length-1;i>=0;--i)
+ {
+ var o=ro[i];
+ if(!o.cont)continue;
+ var e=document.createElement('div');
+ e.classList.add('comment');
+ var p=document.createElement('div');
+ p.style.padding='0.5em 0 0.5em 0.5em';
+ p.innerHTML=o.cont;
+ var t=document.createElement('div');
+ t.classList.add('author');
+ if(!o.author.length)o.author='Anonymous';
+ t.innerHTML=o.author+" at "+o.time;
+ e.appendChild(p);
+ e.appendChild(t);
+ document.getElementById('commentdiv').appendChild(e);
+ }
}
}
+ gb_load();
</script>
- <form action="/leave-a-message/writemessage.php" id="msgform" method="post" style="padding:5px;border:1px solid #CCC;">
+ <form id="msgform" method="post" style="padding:5px;border:1px solid #CCC;">
<span style="width:98%;display:table;">
<label for="name" style="display:table-cell;width:1px;white-space:nowrap;">Your honourable name:</label>
<input type="text" id="mname" name="name" required style="margin-left:5px;display:table-cell;width:100%;">
</span>
<div style="padding:0.5em;">Message:</div>
<textarea required id="mcontent" name="content" rows="5" style="width:97%;margin:0.5em;"></textarea>
- <div style="padding:0.5em;">
- Something Annoying: <span id="ann" style="color:#F00;display:none;">Please complete the annoying challenge!</span></div>
- <div style="margin:0 auto;width:304px;" class="g-recaptcha" data-sitekey="6Lf1lAcUAAAAAGep8SpTETdIrEiw6w8uVy8IXp9U"></div><br>
<div style="text-align:center;">
- <button onclick="verify();" type="button">Leave the message!</button>
+ <button id="button_send" onclick="gb_send();" type="button">Leave the message!</button>
</div>
</form>
</div>
@@ -565,11 +574,6 @@ function swonload(){
</div>
<div class="block" id="links">
<h2>Links</h2><hr>
- <h3>File transfer</h3>
- <ul>
- <li><a href="./data">Data folder</a></li>
- <li><a href="./upload">File upload(LAN only)</a></li>
- </ul>
<h3>Miscellaneous tools and games</h3>
<ul>
<li><a href="/codeforces-rating-cmp">CodeForces Rating Comparator</a></li>
@@ -587,6 +591,7 @@ function swonload(){
<li><a rel="external" target="_blank" href="https://yyc12345.github.io/MyBlog/">yyc12345 の Blog</a></li>
<li><a rel="external" target="_blank" href="https://oing9179.github.io/blog">oing9179 的笔记本儿</a></li>
<li><a rel="external" target="_blank" href="https://719daze.me">719daze</a></li>
+ <li><a rel="external" target="_blank" href="https://owner203.com">OWNER203'S WORLD</a></li>
</ul>
</div>
<div style="text-align:center;padding:0.5em;">
@@ -613,9 +618,5 @@ function swonload(){
<img src="koishi_norm.png" alt="" width="320" id="aqt6" decoding="async">
<img src="koishi_hovr.png" alt="" width="320" id="aqt6a" decoding="async" style="display:none;">
</div>
- <!--<div id="v4" style="display:none;transform:none !important;" class="floatingr" onmouseover="changeImage('aqt4a','aqt4')" onmouseout="changeImage('aqt4','aqt4a')" onclick="this.style.display='none';">
- <img src="yuyuko_debian.png" alt="" width="240" id="aqt4" decoding="async">
- <img src="yuyuko_debian.png" alt="" width="240" id="aqt4a" decoding="async" style="display:none;">
- </div>-->
</body>
</html>