Fossil SCM

Make an exception in the spider protection code for Opera Mini.

joel 2013-09-27 04:08 trunk
Commit 1a30da30db0b2385b5ff7ed8b2a52fa4276181a9
1 file changed +8 -1
+8 -1
--- src/style.c
+++ src/style.c
@@ -175,11 +175,18 @@
175175
}
176176
for(i=0; i<nFormAction; i++){
177177
@ gebi("form%d(i+1)").action="%s(aFormAction[i])";
178178
}
179179
@ }
180
- if( db_get_boolean("auto-hyperlink-mouseover",0) ){
180
+ if( strglob("*Opera Mini/[1-9]*", P("HTTP_USER_AGENT")) ){
181
+ /* Special case for Opera Mini, which executes JS server-side */
182
+ @ var isOperaMini = Object.prototype.toString.call(window.operamini)
183
+ @ === "[object OperaMini]";
184
+ @ if( isOperaMini ){
185
+ @ setTimeout("setAllHrefs();",%d(nDelay));
186
+ @ }
187
+ }else if( db_get_boolean("auto-hyperlink-mouseover",0) ){
181188
/* Require mouse movement prior to activating hyperlinks */
182189
@ document.getElementsByTagName("body")[0].onmousemove=function(){
183190
@ setTimeout("setAllHrefs();",%d(nDelay));
184191
@ this.onmousemove = null;
185192
@ }
186193
--- src/style.c
+++ src/style.c
@@ -175,11 +175,18 @@
175 }
176 for(i=0; i<nFormAction; i++){
177 @ gebi("form%d(i+1)").action="%s(aFormAction[i])";
178 }
179 @ }
180 if( db_get_boolean("auto-hyperlink-mouseover",0) ){
 
 
 
 
 
 
 
181 /* Require mouse movement prior to activating hyperlinks */
182 @ document.getElementsByTagName("body")[0].onmousemove=function(){
183 @ setTimeout("setAllHrefs();",%d(nDelay));
184 @ this.onmousemove = null;
185 @ }
186
--- src/style.c
+++ src/style.c
@@ -175,11 +175,18 @@
175 }
176 for(i=0; i<nFormAction; i++){
177 @ gebi("form%d(i+1)").action="%s(aFormAction[i])";
178 }
179 @ }
180 if( strglob("*Opera Mini/[1-9]*", P("HTTP_USER_AGENT")) ){
181 /* Special case for Opera Mini, which executes JS server-side */
182 @ var isOperaMini = Object.prototype.toString.call(window.operamini)
183 @ === "[object OperaMini]";
184 @ if( isOperaMini ){
185 @ setTimeout("setAllHrefs();",%d(nDelay));
186 @ }
187 }else if( db_get_boolean("auto-hyperlink-mouseover",0) ){
188 /* Require mouse movement prior to activating hyperlinks */
189 @ document.getElementsByTagName("body")[0].onmousemove=function(){
190 @ setTimeout("setAllHrefs();",%d(nDelay));
191 @ this.onmousemove = null;
192 @ }
193

Keyboard Shortcuts

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