Fossil SCM

An experiment in reducing the proof-of-work to a single operation. (This description is intentionally vague.)

stephan 2025-08-17 12:10 trunk
Commit b765e6526781ad6d8b9ed5578b1b1f22283b60af1c7028317aab4ab65c367a49
2 files changed +11 -19 +1
+11 -19
--- src/robot.c
+++ src/robot.c
@@ -101,29 +101,21 @@
101101
@ Press <input type="submit" id="x5" value="Ok" focus> to continue</p>
102102
cgi_query_parameters_to_hidden();
103103
@ <input id="x4" type="hidden" name="proof" value="0">
104104
@ </form>
105105
@ <script nonce='%s(style_nonce())'>
106
- @ function aaa(x){return document.getElementById(x);}
107
- @ function bbb(h,a){
108
- @ aaa("x4").value=h
109
- @ if((a%%75)==0){
110
- @ aaa("x2").textContent=aaa("x2").textContent+".";
111
- @ }
112
- @ if(a>0){
113
- @ setTimeout(bbb,1,h+a,a-1);
114
- @ }else{
115
- @ aaa("x3").style.visibility="visible";
116
- @ aaa("x2").textContent="";
117
- @ aaa("x1").textContent="All clear";
118
- @ aaa("x6").onsubmit=function(){aaa("x3").style.visibility="hidden";};
119
- @ aaa("x5").focus();
120
- @ }
121
- @ }
122
- k = 800 + h2%99;
123
- h2 = (k*k + k)/2;
124
- @ setTimeout(function(){bbb(%u(h1-h2),%u(k));},10);
106
+ @ window.addEventListener('load',function(ev){
107
+ @ const E = (x)=>document.getElementById(x);
108
+ @ const gcs = window.getComputedStyle(document.body);
109
+ @ if( gcs.zIndex==='0' ) {
110
+ @ E("x3").style.visibility="visible";
111
+ @ E("x2").textContent="";
112
+ @ E("x1").textContent="All clear";
113
+ @ E("x6").onsubmit=function(){E("x3").style.visibility="hidden";};
114
+ @ E("x5").focus();
115
+ @ }
116
+ @ },false);
125117
@ </script>
126118
style_finish_page();
127119
return 1;
128120
}
129121
130122
--- src/robot.c
+++ src/robot.c
@@ -101,29 +101,21 @@
101 @ Press <input type="submit" id="x5" value="Ok" focus> to continue</p>
102 cgi_query_parameters_to_hidden();
103 @ <input id="x4" type="hidden" name="proof" value="0">
104 @ </form>
105 @ <script nonce='%s(style_nonce())'>
106 @ function aaa(x){return document.getElementById(x);}
107 @ function bbb(h,a){
108 @ aaa("x4").value=h
109 @ if((a%%75)==0){
110 @ aaa("x2").textContent=aaa("x2").textContent+".";
111 @ }
112 @ if(a>0){
113 @ setTimeout(bbb,1,h+a,a-1);
114 @ }else{
115 @ aaa("x3").style.visibility="visible";
116 @ aaa("x2").textContent="";
117 @ aaa("x1").textContent="All clear";
118 @ aaa("x6").onsubmit=function(){aaa("x3").style.visibility="hidden";};
119 @ aaa("x5").focus();
120 @ }
121 @ }
122 k = 800 + h2%99;
123 h2 = (k*k + k)/2;
124 @ setTimeout(function(){bbb(%u(h1-h2),%u(k));},10);
125 @ </script>
126 style_finish_page();
127 return 1;
128 }
129
130
--- src/robot.c
+++ src/robot.c
@@ -101,29 +101,21 @@
101 @ Press <input type="submit" id="x5" value="Ok" focus> to continue</p>
102 cgi_query_parameters_to_hidden();
103 @ <input id="x4" type="hidden" name="proof" value="0">
104 @ </form>
105 @ <script nonce='%s(style_nonce())'>
106 @ window.addEventListener('load',function(ev){
107 @ const E = (x)=>document.getElementById(x);
108 @ const gcs = window.getComputedStyle(document.body);
109 @ if( gcs.zIndex==='0' ) {
110 @ E("x3").style.visibility="visible";
111 @ E("x2").textContent="";
112 @ E("x1").textContent="All clear";
113 @ E("x6").onsubmit=function(){E("x3").style.visibility="hidden";};
114 @ E("x5").focus();
115 @ }
116 @ },false);
 
 
 
 
 
 
 
 
117 @ </script>
118 style_finish_page();
119 return 1;
120 }
121
122
--- src/style.c
+++ src/style.c
@@ -826,10 +826,11 @@
826826
if( g.perm.Debug && P("showqp") ){
827827
@ <div class="debug">
828828
cgi_print_all(0, 0, 0);
829829
@ </div>
830830
}
831
+ @ <style>body { z-index: 0 }</style>
831832
fossil_free(zTitle);
832833
}
833834
834835
#if INTERFACE
835836
/* Allowed parameters for style_adunit() */
836837
--- src/style.c
+++ src/style.c
@@ -826,10 +826,11 @@
826 if( g.perm.Debug && P("showqp") ){
827 @ <div class="debug">
828 cgi_print_all(0, 0, 0);
829 @ </div>
830 }
 
831 fossil_free(zTitle);
832 }
833
834 #if INTERFACE
835 /* Allowed parameters for style_adunit() */
836
--- src/style.c
+++ src/style.c
@@ -826,10 +826,11 @@
826 if( g.perm.Debug && P("showqp") ){
827 @ <div class="debug">
828 cgi_print_all(0, 0, 0);
829 @ </div>
830 }
831 @ <style>body { z-index: 0 }</style>
832 fossil_free(zTitle);
833 }
834
835 #if INTERFACE
836 /* Allowed parameters for style_adunit() */
837

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button