Fossil SCM
More robust check whether the query parameter to update the display cookie is present.
Commit
ac348b03e50a3259d8b134f35d080bec6b97629353da57714872f40a61af4f4d
Parent
a8ef0da81ecf18d…
1 file changed
+3
-6
+3
-6
| --- src/fossil.diff.js | ||
| +++ src/fossil.diff.js | ||
| @@ -139,16 +139,13 @@ | ||
| 139 | 139 | if( href && href!=location.href.slice(-href.length) ){ |
| 140 | 140 | location.href = href; |
| 141 | 141 | } |
| 142 | 142 | } |
| 143 | 143 | else if( key==kUDCD ){ |
| 144 | - var | |
| 145 | - pqry = 'udc=1', | |
| 146 | - psep = /\?/.test(location.href) ? '&' : '?', | |
| 147 | - href = location.href + psep + pqry; | |
| 148 | - if( location.href.slice(-pqry.length)!=pqry ){ | |
| 149 | - location.href = href; | |
| 144 | + if( !/[?&]udc=1/.test(location.href) ){ | |
| 145 | + var sep = /\?/.test(location.href) ? '&' : '?'; | |
| 146 | + location.href += sep + 'udc=1'; | |
| 150 | 147 | } |
| 151 | 148 | } |
| 152 | 149 | }/*,true*/); |
| 153 | 150 | },false); |
| 154 | 151 | }()); |
| 155 | 152 |
| --- src/fossil.diff.js | |
| +++ src/fossil.diff.js | |
| @@ -139,16 +139,13 @@ | |
| 139 | if( href && href!=location.href.slice(-href.length) ){ |
| 140 | location.href = href; |
| 141 | } |
| 142 | } |
| 143 | else if( key==kUDCD ){ |
| 144 | var |
| 145 | pqry = 'udc=1', |
| 146 | psep = /\?/.test(location.href) ? '&' : '?', |
| 147 | href = location.href + psep + pqry; |
| 148 | if( location.href.slice(-pqry.length)!=pqry ){ |
| 149 | location.href = href; |
| 150 | } |
| 151 | } |
| 152 | }/*,true*/); |
| 153 | },false); |
| 154 | }()); |
| 155 |
| --- src/fossil.diff.js | |
| +++ src/fossil.diff.js | |
| @@ -139,16 +139,13 @@ | |
| 139 | if( href && href!=location.href.slice(-href.length) ){ |
| 140 | location.href = href; |
| 141 | } |
| 142 | } |
| 143 | else if( key==kUDCD ){ |
| 144 | if( !/[?&]udc=1/.test(location.href) ){ |
| 145 | var sep = /\?/.test(location.href) ? '&' : '?'; |
| 146 | location.href += sep + 'udc=1'; |
| 147 | } |
| 148 | } |
| 149 | }/*,true*/); |
| 150 | },false); |
| 151 | }()); |
| 152 |